view this page source to copy perl command.
====================
== make alias
$ cat alias.txt # this line is too long to post Command-line-fu
perl -MHTML::Form -MLWP::UserAgent -e'$a=LWP::UserAgent->new;push@{$a->{requests_redirectable}},"POST";$u="http://www.commandlinefu.com/commands/browse";$f=HTML::Form->parse($a->get($u)->content,$u);$f->value(q=>join" ",@ARGV);for($a->request($f->click)->content=~m!<div class="one-liner">(.+?)(?=<div class="one-liner">|</html>)!sg){($s)=m!<div class="summary".+?>(.+?)<!s;($_)=m!<div class="command">\s*(.*?)<!s;s/</</g;s/>/>/g;s/"/"/g;s/&/&/g;print"### $s\n$_\n\n";++$n>7&&last}'
$ alias clgrep=`cat alias.txt`
====================
== grep the archive about "backup"
$ clgrep backup
### quickly backup or copy a file with bash
cp filename{,.bak}
### infile search and replace on N files (including backup of the files)
perl -pi.bk -e's/foo/bar/g' file1 file2 fileN
### backup directory. (for bash)
cp -pr directory-you-want-to-backup{,_`date +%Y%m%d`} # for bash
$
====================
== grep the archive about "wget"
$ clgrep wget
### Download all images from a site
wget -r -l1 --no-parent -nH -nd -P/tmp -A".gif,.jpg" http://example.com/images
### Extract tarball from internet without local saving
wget -qO - "http://www.tarball.com/tarball.gz" | tar zxvf -
### Echo the latest commands from commandlinefu on the console
wget -O - http://www.commandlinefu.com/commands/browse/rss 2>/dev/null | awk '/\s*<title/ {z=match($0, /CDATA\[([^\]]*)\]/, b);print b[1]} /\s*<description/ {c=match($0, /code>(.*)<\/code>/, d);print d[1]"\n"} '
### Get My Public IP Address
wget -qO - http://myip.dk/ | egrep -m1 -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
$
====================
== grep recently posted
$ clgrep
### Launch an Explorer window with a file selected
explorer /select,[file]
### Search specified $TEXT1 and Replace that by specified arg ($TEXT2)
find "$DIR" -regex "$FILENAME" -type f -print0 | xargs -0 sed -i _`date "+%y%m%d%H%M%S"` -E "s/$TEXT1/$TEXT2/g"
### count IPv4 connections per IP
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | sed s/::ffff:// | cut -d: -f1 | sort | uniq -c | sort -n
$