hb(){ sed "s/\($*\)/`tput setaf 2;tput setab 0;tput blink`\1`tput sgr0`/gI"; }
hb blinks, hc does a reverse color with background.. both very nice.
hc(){ sed "s/\($*\)/`tput setaf 0;tput setab 6`\1`tput sgr0`/gI"; }
Run this:
command ps -Hacl -F S -A f | hc ".*$PPID.*" | hb ".*$$.*"
Your welcome ;)
From my bash profile - http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html
Show Sample Output
Find the number of files from each folder
A command to find out what the day ends in. Can be edited slightly to find out what "any" output ends in. NB: I haven't tested with weird and wonderful output. Show Sample Output
This will list all tags that match the live* glob and contain commit 18f6f2 Show Sample Output
The shell has perfectly adequate pattern matching for simple expressions. Show Sample Output
For those days when you need to know if something is happening because the day ends in "y". Show Sample Output
shorter than alternative
You are stuck with testing a tcp port using telnet, and must kill the telnet session from another terminal... Or, press ctrl+5 and write close/quit to force the current connection to close.. Show Sample Output
scale define the number you want after comma Show Sample Output
This CLI requiere the uniconv package that is provided with the yudit unicode editor . The wubi86 is a way to type chinese far quicker than pinyin . More infor on wikipedia : http://en.wikipedia.org/wiki/Wubizixing , http://www.yale.edu/chinesemac/wubi/xing.html Show Sample Output
ethtool is used for querying settings of an ethernet device and changing them. In this example I setup 100 Mb/s full duplex on my Linux Box
This assumes there is only one result. Either tail your search for one result or add | head -n 1 before the closing bracket. You can also use locate instead of find, if you have locate installed and updated
Change open-command and type to suit your needs. One example would be to open the last .jpg file with Eye Of Gnome: eog $(ls -rt *.jpg | tail -n 1)
vim 7 or higher has internal sort, too 'sort n' for numbers
This will tell you which twitter user you are chronologically. For example, a number of 500 means you were the 500th user to create a twitter account. Show Sample Output
the '!' command in vi spawns a shell, then pipes all of the specified lines in the buffer through the command specified after '!', replacing all input lines with the result of the command.
If you have file opened in emacs and was just changed, the fastest way to reload the file is C-x C-v, as its default value is the path of the file.
Removes any whitespace characters at the beginning of a line.
Sometimes you want to work on data sheets by using heirloom unic commands like cut, paste, sed, sort, wc and good old awk. But your user works on Microsoft Excel spreadsheet. The idea: 1) ask your user to save it as "Unicode Text" from Microsoft Excel and send the document to you; 2) use the given command to convert it to UTF-8 text. We carefully convert "\r\n" to local end-of-line character; and to convert "\n" (in Excel, means linebreak within the table cell") to "\r", which is carrier return but not end-of-line in Unix. If the "\n" is not replaced with "\r", for example, wc -l will report incorrect column number.
should be very consistent cause it's google :-)
Warning!, if the pattern didn't find anything it shows the total size of dot dir Show Sample Output
(only when vim has been compiled with +clipboard)
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: