Tip #743 Grep for word in directory
I've often seen people using the find command on a directory to get all the files, then using these with grep to find files containing a particular word. This can however, be done better just using grep:Read more »
- TAGS:
- grep
Tip #313 Get latest stable version of the Linux kernel
A simple shell script to get the latest stable version of the linux kernel:Read more »
Tip #290 Crawl a web page for links
lynx -dump http://www.spantz.org | grep -A999 "^References$" | tail -n +3 | awk '{print $2 }' Read more »Tip #215 Calendar with today colored [handle single digit dates]
If your version of grep supports coloring matches, you can use the following to give a calendar with the current date colored:Read more »
Tip #88 a better cut
use `grep -o` to select only the pattern matched rather than the whole line:Read more »
- TAGS:
- grep
Tip #304 Get your IP in one line
#!/bin/bash# by dj.r4iden
echo "Your ip Address is" `lynx --source http://www.formyip.com/ |grep The | awk {'print $5'}` Read more »
Tip #384 BBC Weather
Go to [http://www.bbc.co.uk/cgi-perl/weather/search/new_search.pl] and search for your location. Copy the link to the 3 day forecast feed, for example [http://feeds.bbc.co.uk/weather/feeds/rss/5day/world/0105.xml]. Then just put that link into the following command to get a quick command line weather forecast.Read more »
Tip #282 Highlight Grepped Text
Grep file(s) and highlight the grep matches using less...Read more »
- TAGS:
- grep
Tip #258 List non-system users
I use the following to list non-system users. It should be portable though won't work on systems without the getent command.Read more »
Tip #64 Find occurrences of a string in a large code base without firing
example, look for all the TODO and HACK strings I left in large java project and show a bit of context before and after using the -C switch of grep.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