Tip #460 Random IP addresses
nmap -iR 20 -sL -n|awk '{print $2}'|grep '^[0-9]'|uniq Read more »Tip #510 iso2cd
My little "iso2cd" alias. Not clean, but handy. The Burning device will be auto detected.example call:
iso2cd debian_lenny_final.iso
alias iso2cd="cdrecord -s dev=`cdrecord --devices 2>&1 | grep "\(rw\|dev=\)" | awk {'print $2'} | cut -f'2' -d'=' | head -n1` gracetime=1 driveropts=burnfree -dao -overburn -v" Read more »
Tip #117 Find function declarations in PHP or JavaScript
function findfunc {grep -R $1 * 2> /dev/null |grep function|grep -v .svn
}
Read more »
- TAGS:
- grep
Tip #96 Find occurrences of a string in a large code base without firing
A slight improvement to #64 -- drops one grep and adds line numbersRead more »
Tip #540 Command examples from shell-fu
The following isn't particularly pretty and should be considered a work in progress, but it's quite fun.Get examples of ways a command can be used direct from shell-fu by adding the following alias:
Read more »
Tip #311 Filter stderr for cron jobs
Tired to get your mailbox full of cron information messages?Eg.: some programs (pg_dump, /etc/init.d/xxx, ...) output informational messages on stderr, but you can't close stderr because it may also contain failure informations.
Read more »
Tip #87
Perform a recursive grep of the Solaris /etc directory, bypassing those nasty sockets Sun keeps in there:Read more »
- TAGS:
- grep
Tip #525 Find words in garbled text
Have a bunch of garbled text? Curious as to what words might be found inside? Try the following:Read more »
- TAGS:
- grep
Tip #468 Moved Trac and Subversion repositories to another machine/direct
CASE: You've relocated Subversion and Trac repositories to another machine/directories. You don't want to edit n+1 trac.ini files.You have for example:
/repos/svn-myprojects/my-first-project
/repos/trac-myprojects/my-first-project
/repos/svn-myprojects/my-second-project
/repos/trac-myprojects/my-second-project
...etc...
Change ALL trac.ini repository_dir settings:
trac-mass-repodir-edit.sh:
Read more »
alias aptitude at awk bash bc cal cat cd colrm comm cp csh curl cut date dd df dialog diff dirname dpkg du fc find fuser grep gs gzip history iconv kill ksh last less ln ls lsof lynx m4 md5sum mkdir mkfifo mkisofs mv mysql nc netstat openssl OSX perl ping popd ps pushd python read redirection rm scp screen sed sort ssh stat sudo svn tail tar tee test top tr uniq vim wc wget xargs