Commands tagged awk (348)

What's this?

commandlinefu.com 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

tree command limit depth for recusive directory list
sometimes I need list from path with max limit for recursive depth directory listing

set your ssd disk as a non-rotating medium
if you still get a permissions error using sudo, then nano the file: sudo nano -w /sys/block/sdb/queue/rotational and change 1 to 0 this thread: http://www.ocztechnologyforum.com/forum/showpost.php?p=369836&postcount=15 says that this will "help the block layer to optimize a few decisions"

Tired of switching between proxy and no proxy? here's the solution.
Replace 10.0.0.0/8 with your largest local subnet. replace 10.1.1.123:3128 with your proxy information.. Note this only works with a proxy server configured for passive setup.. Now your firefox transparently proxy's stuff destined outside your network.. and Doesn't proxy stuff inside your network. as well as all your other favorite web applications. curl, wget, aria2 ect.

List hostnames of all IPs

a function to create a box of '=' characters around a given string.
First argument: string to put a box around. Second argument: character to use for box (default is '=') Same as command #4962, cleaned up, shortened, and more efficient. Now a ' * ' can be used as the box character, and the variables get unset so they don't mess with anything else you might have. They marked c++ as a function for this command, but I'm not sure why. Must be a bug.

Make changes in .bashrc immediately available
You may want to just use the shortcut "." instead of "source"

Install pip with Proxy
Installs pip packages defining a proxy

How To Display Bash History Without Line Numbers
userful for direct copy & paste command for doumenation or next using

Search and play youtube videos directly to terminal (no X needed)
Same as other command, however uses youtube-dl internal search (thanks to qoxxxx mentioning this) It does however seem to be a little buggy and youtube-dl crashes sometimes. ## pyt 'Stairway to heaven - Led Zeppelin' pyt 'brain damage - Pink Floyd' No web browser or even X needed. Just a cli and internet connection! mplayer is pauseable and can skip ahead This may break if youtube changes their search html.

Use all the cores or CPUs when compiling
Force make command to create as many compile processes as specified (4 in the example), so that each one goes into one core or CPU and compilation happens in parallel. This reduces the time required to compile a program by up to a half in the case of CPUs with 2 cores, one fourth in the case of quad cores... and so on.


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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

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: