Check These Out
Pipe any JSON to jq, then count with the appropiate expression and use the | length on the array
Search and replace recursively. :-) Shorter and simpler than the others. And allows more terms:
replace old new [old new ...] -- `find -type f`
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
That works in all softs, CLI or GUI... I don't want to waste time to all the time typing the same stuff . So, I have that command in my window manager shortcuts ( meta+l ). All the window managers have editable shortcuts AFAIK. If not, or you don't want to use it that way, you can easily use the xbindkeys soft.
I you're using kde4, you can run :
$ systemsettings
then open "inputs actions" and create a new shortcut.
For Gnome take a look there : http://www.cyberciti.biz/faq/howto-create-keyboard-shortcuts-in-gnome/
A more advanced one, with strings and newlines :
$ xvkbd -xsendevent -text "---8
single-column-numbers.txt is a text file with 22658 rows (numbers) in a single column. Each number can range from 0 to 134298679.533591 and the dot is for the decimals.
This is done with perl because awk can't sum such high numbers.
replace "directory name with files to add to DVD" with actual directory containing files you want to add to growable DVD
This is a simple case of recursing through all directories, adding the '.bak' extension to every file. Of course, the 'cp $file $file.bak' could be any code you need to apply to your recursion, including tests, other functions, creating variables, doing math, etc. Simple and clean recursion.
Adjust the
$ head -c
part for password length.
I use filenames like "hans@commandlinefu.com.gpg" and a vim which automatically decrypts files with .gpg suffixes.
Example :
$ vim /etc/fstab
## damn
$
$ sudo
## like a boss.
Example 2 :
$ sudo vim /root/bin/
##uh... autocomplete doesn't work...
$
$ sudo ls /root/bin
##ah! that's the name of the file!
$ sudo vim /root/bin/ ##resume here! Thanks readline!