Not better, but more lightweight (sed instead of perl).
Above command is reduced due to length restriction of less than 256 characters and entity encoding of "Save" command on this page. This is complete command (best without entity encoding):
echo -e '\x2Helo folks\t!\r' | sed "y/\x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xA\xB\xC\xD\xE\xF\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20/␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟␠/"
␂Helo␠folks␉!␍
Show Sample Output
btrfs checksum errors console report. Show Sample Output
Tested on Windows 8 w/SSH, Cygwin - it can be tricky to quote if you dont use the $(..) syntax to echo it back out Show Sample Output
Downloads this raw script https://github.com/git/git/blob/master/contrib/completion/git-completion.bash from Github, copies it to your home directory, autoloads it in ~/.bashrc and sources it.
piped this to pbcopy (OSX only) you got a uuid in the pasteboard Show Sample Output
change the path where you are, when is executed, is usefule when you've got folders to classify something like a tags, you've got devel/dist, android/ios, etc. like: ~user/Documents/devel/project ~user/Documents/dist/project You can change between devel/project folder to dist/project without leave project. If somebody has a better idea to do that without replace command. Show Sample Output
Downloads a CRL file, determines the expiration time, and checks when it will expire Show Sample Output
echoprint identify your song, then return artist, song name and album name(release) in a JSON. jq parse it and mp3info set the data in your mp3 file.
of course it depends on:
mp3info
jq
echoprint
You need to set the environment variable
export CODEGEN_NEST_API_KEY='YOUR_ECHONEST_KEY_HERE'
You can use it with find, but probably will bypass the 120 request/minute of developer account key. So, use a sleep to do it.
Something like:
find -name \*.mp3 | while read $f; do eval echo $(echoprint-codegen "$f" | jq ' .[0].metadata | "mp3info -a \"" + .artist + "\" -t \"" + .title + "\" -l \"" + .release + "\" \"" + .filename + "\"" ' ) | bash; sleep 1; done
echo 1 > /proc/sys/sunrpc/nfs_debug && tail -f /var/log/messages to debug NFS issues.
There are many ways to do it on *nix. But on Windows, it's a bit convoluted. I use the above command expression in a batch file to check if a process is running already before running it again. I use this is a batch file I created to switch between 2 different versions of PowerBuilder (PB). I wanted to make sure, one version of PB is not running, before letting the user to switch, hence this check. (replace notepad.exe with PB125.exe above). /nh means no header, /fi means filter. We are filtering for Notepad.exe only above. Then, we take that and look for Notepad.exe using a FindStr command. It will still work, even if we don't have those 2 flags, but it makes finding the right program quicker. && and || are part of the conditional expressions see here: http://www.robvanderwoude.com/condexec.php. We use these to print for the IF...ELSE condition. >nul is the equivalent of Unix /dev/null Rest is self explanatory, I think. Show Sample Output
this command can be added to crontab so as to execute a nightly backup of directories and store only the 10 last backup files.
Monitoring system in one line : DISK : disk space MEM: memory ( mem , swap, Total) CPU : all information about cpu activity LOAD : load average Show Sample Output
Given a hosts list, ssh one by one and echo its name only if 'processname' is not running. Show Sample Output
Google Cloud SDK comes with a package manager `gcloud components` but it needs a bit of `sed` to work. Modify the "^| Not" bit to change the package selection. (The gcloud --format option is currently broken) Show Sample Output
Easiest way to get the external IP address.
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: