We use this to quickly highlight differences and provide a quick way to cut and paste the command to view the files using the marvellous vimdiff Show Sample Output
-O switch creates local filename same as remote curl [][] -o #1#2 makes local files unique inserting sequence values into #x placeholders sequences can be alpha or numeric e.g [a-z] [1-25]
Subtitles' file names contain S04E01, S04E02, ... S04E12 and end with ".smi". Videos' file names contain S04E01, S04E02, ... S04E12 and end with ".avi". You can change the patterns by changing `ls *S04E$jj*.smi` and `ls *S04E$jj*.avi` parts. You can change the number of starting and ending file by changing `seq -f "%02.0f" 1 12` part.
Replaces every ocurrence of 'old' for 'new' in all files specified. After the 'i' char you can put a '~' or whatever to create a backup file for each replaced with the name equal to the original plus character.
just for fun
Useful if you have to tunnel ssh through a local port and it complains of the host key being different. Much easier than manually editing the file.
Only excludes .svn from filenames. Show Sample Output
Open a terminal (urxvt in this case) to connect to a screen session (named "main") and create the screen session if necessary.
Ping machine once, waiting 1 second for response until failing. Upon fail, ssh globally, otherwise ssh locally.
Returns the pathnames of the files which would be executed in the current environment had its arguments been given as a command.
Variant of find grep that ignores files with .svn in the name. Useful for searching through a local repository of source code.
Replace and accordingly.
bash/ksh subshell redirection (as file descriptors) used as input to diff
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: