I used curl instead of lynx. Show Sample Output
Let -p do it's voodoo and do absolutely nothing but set the output record separator :-)
Change your exported xml love list from last.fm, into Song: songname Artist: artistname Show Sample Output
more idiomatic version of the same, using the flip-flop-operator; also printing lines with '//'-style comments
Find all files in /var/spool/mqueue older than 7 days, pass to perl to efficiently delete them (faster than xargs or -exec when you've got millions or hundreds of thousands to delete). Naturally the type, directory, and file age vars can be adjusted to meet your specific needs.
Lets say you have a file with the following layout: LINUX,DIR,FILE1,FILE2,FILE3 You want the file to look like this: LINUX,DIR,FILE1 LINUX,DIR,FILE2 LINUX,DIR,FILE3 This perl command does it for you. Show Sample Output
Before running, do: curl -sO http://world.std.com/%7Ereinhold/diceware.wordlist.asc Show Sample Output
This version now adds a header with consecutive numbering. Show Sample Output
Find which directories on your system contain a lot of files. Edit: much shorter and betterer with -n switch. Show Sample Output
say only processes a complete file, at eof, so following a file isn't possible. Quick and dirty perl oneliner to feed each line from the tail -f to say. Yes, expensive to lauch a new process each line. This little ditty was prompted by a discussion on how horrible it is to use VoiceOver on ncurses programs such as irssi.
with a semicolon text file map, apply multiple replace to a single file Show Sample Output
Require: perl -MCPAN -e 'install Acme::POE::Tree' From: http://www.catonmat.net/blog/christmas-tree-in-the-shell/
dirrrty: use -p to chomp automatically, substitute all newlines away and then replace the "---" by a newline ? bingo! s/// => s/// is just a cooler way to write s///, s/// which is just the small brother of s///; s/// (comma is an operator!) have fun!
Lists all the modules that were installed the "proper way". It also uses Perl 5.10(or higher)'s say command for less typing. Show Sample Output
convert a unix timestamp to a human readable format. Show Sample Output
This will create a new file with proper code formatting and all comments removed.
This will also print the path to file which is not included in the other examples. Show Sample Output
This is especially useful to get crazy stuff like space characters copied to your pasteboard correctly. Source: https://github.com/mathiasbynens/dotfiles/blob/master/.functions Show Sample Output
Here's a perl version that only considers printable characters. Change the regex /[[:print:]]/ to look for different sets of delimiter characters.
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.
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
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: