Commands by buildingpermit (0)

  • bash: commands not found

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Check These Out

FizzBuzz in one line of Bash
The (in)famous "FizzBuzz" programming challenge, answered in a single line of Bash code. The "|column" part at the end merely formats the output a bit, so if "column" is not installed on your machine you can simply omit that part. Without "|column", the solution only uses 75 characters. The version below is expanded to multiple lines, with comments added. for i in {1..100} # Use i to loop from "1" to "100", inclusive. do ((i % 3)) && # If i is not divisible by 3... x= || # ...blank out x (yes, "x= " does that). Otherwise,... x=Fizz # ...set x to the string "Fizz". ((i % 5)) || # If i is not divisible by 5, skip (there's no "&&")... x+=Buzz # ...Otherwise, append (not set) the string "Buzz" to x. echo ${x:-$i} # Print x unless it is blanked out. Otherwise, print i. done | column # Wrap output into columns (not part of the test).

download the contents of a remote folder in the current local folder

run a command whenever a file is touched
This is useful if you'd like to see the output of a script while you edit it. Each time you save the file the command is executed. I thought for sure something like this already exists - and it probably does. I'm on an older system and tend to be missing some useful things. Examples: $ ontouchdo yourscript 'clear; yourscript somefiletoparse' Edit yourscript in a separate window and see new results each time you save. $ ontouchdo crufty.html 'clear; xmllint --noout crufty.html 2>&1 | head' Keep editing krufty.html until the xmllint window is empty. Note: Mac/bsd users should use stat -f%m. If you don't have stat, you can use perl -e '$f=shift; @s=stat($f); print "$s[9]\n";' $1

renice by name

Go to the Nth line of file [text editor]
This is not printing, real editing using the text editor.

Get playlist for Livestream on YouTube

Make backups of your home DVDs easily. Other: mencoder dvd://1 -o "$targetDir/$dvdTitle.avi" -aid "$audioID" -ovc x264 -x264encopts qp=26:frameref=3:bframes=15:direct_pred=auto:cabac:weight_b:partitions=all:8x8dct:me=esa:me_range=24:subq=7:mixed_refs:trellis=2:bitrate=1000:nofast_pskip:threads=0 -oac mp3lame

Automatically tunnel all ports of running docker instances in boot2docker
It requires, that comes with brew: brew install jq

Monitor a file's size
use "watch" instead of while-loops in these simple cases

Best kayak chiang
Just how to best outfit your fishing kayak can rely upon they type of fishing you're performing and the conditions you'll encounter. Little streams and seas need different concerns than offshore huge game fishing for instance. Whatever form of fishing you want to do, kayak fishing has some distinctive factors as the space is limited. It will be vital that you prioritize the most crucial things that you'll require to gain access to most regularly, and have them within simple reach. Some fishermen like to help keep it simple and hold the minimal level of gear: some like to hold something that they might probably need. There are several standard components that will raise the fish-ability of a kayak, or ensure it is more angler-friendly. Seats: Different than the usual exercise and your fishing equipment I'd claim that a high quality seat are at the the top of priority list. If you intend to spend your day fishing in comfort, you need to purchase a kayak with an excellent seat, or install one yourself. Pole Members: These are easy and useful areas to carry your rods securely while paddling, fishing or trolling. Some kayaks result from the factory with flush mounted rod slots or rod cases mounted on variable brackets. Some kayak retailers may modify your kayak by rigging pole cases for you really to match the wants of one's fishery: you may prefer to platform your own. There are numerous different models and types of rod holders from which to choose 1. Remove support rod holders are reduced in profile and give you a clear deck, so are not as likely becoming a range catcher (especially when travel fishing). There are plugs readily available for travel rods, and extensions for mainstream rods. Both could be removed when not in use. 2. Flexible pole members that are attached to the terrace are fully variable up and down, and provide 360-degree rotation. They come in types for spin/bait throwing or fly rods. Some may be removed when maybe not in use, which really is a great function if you are fly fishing. 3. There many other choices for mounting pole cases to seats, dairy crates and several other custom rigs. 4. Whatever the kind of pole holders you utilize, you ought to connect a pole lead therefore you may not lose them overboard. When you have to create a surf entry or exit, you must keep or secure your supports so they're maybe not lost in case of Best kayak chiang. Point Programs: These let you not just to stay in one spot where you would like to fish, but and also to fish a big area in an organized way. If you are sight fishing, blind throwing, or trolling you will need to cover the location as thoroughly that you can, and the correct anchor system will enable you to do so. You need to begin with an point basket as the base for the point system: a constant line working via a pulley on your own bow to a pulley on your stern with a snap land on each conclusion, and mounted on a band in the middle. You are able to fix your anchor line to or through the band, allowing you to modify your anchor point from any stage along the entire length of the kayak.

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: