Filter out an email address from a pipe
tel blenkinsop | grep -o "[[:alnum:][:graph:]]*@[[:alnum:][:graph:]]*"
Where tel is a simple address book script, in this case I just want the email address and not the whole address
Labels: grep
Great Tips on using the Internet to find information, solve problems, make and save MONEY. Also tips on Cool Internet Tools and Websites.
Filter out an email address from a pipe
Labels: grep
Sgrep : Super Grep?
# sgrep has the advantage of being non-line based
sgrep -i '("<h1>" .. "</h1>")' index.php
sgrep -i '("fred" .. "joe")' essay.txt
It gets really useful when you stream it
sgrep -i '("fred" .. "joe")' essay.txt | egrep -i 'keyword'