perl version of "Wait for file to stop changing" When "FileName" has not been changed for last 10 seconds, then print "DONE" "10" in "(stat)[10]" means ctime. One have other options like atime, mtime and others. http://perldoc.perl.org/functions/stat.html
drop first column with perl "$#F" means a index of last column(start from 0). One can easily handle range of columns like "[3..6]"
If you want to search for all symlinks in current directory AND its subdirectories, make sure you omit the "-maxdepth 1" bit. Also, modify regextype as desired. I DO prefer to AVOID the use of extended regexp whenever possible, because this will usually only give correct results if you use GNU find. Hack a line containing ext-regexp into an HP-UX workstation, and you're in trouble.
Prints a string as a sequence of hexadecimal values. Output comes in space separated pairs, regardless of ASCII or Unicode characters Show Sample Output
Start an interactive program with perl code expansion. Everything between #[ ] is evaluated as perl code. #[ ] tags must not be nested (it wouldn't make sense anyway). Show Sample Output
HTTP Get, without LWP::Simple Show Sample Output
If you have many port mappings, docker ps output becomes pretty illegible. The ~120 char one-liner changes the output into a more readable list of container! Show Sample Output
Uses soxi instead of mplayer
This command will replace all instances of 'foo' with 'bar' in all files in the current working directory and any sub-directories.
if you want to only print the IP address from a file. In this case the file will be called "iplist" with a line like "ip address 1.1.1.1" it will only print the "1.1.1.1" portion
Uses curl to download page of membership of US Congress. Use sed to strip HTML then perl to print a line starting with two tabs (a line with a representative) Show Sample Output
don't have to be that complicated
This uses wget instead of curl
Removes special characters (colors) in '^]]Xm' and '^]]X;Ym' format from file. Use pipe ('input | perl [...]') or stream ('perl [...] You can use 'cat -v infile' as 'input' to show special characters instead of interpreting (there is problem with non-ASCII chars, they are replaced by M-[char]).
Easily removes line #2 in ~/.ssh/known_hosts. Show Sample Output
If you don't have seq, you can use perl.
simple table
This attempts to load a Perl Module (-M flag) and use version 9999, since no module has a version this high, Perl exits either a) telling you the version of the module installed or b) tells you it can't find the module. Show Sample Output
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: