cat + grep + wc and pipe operator

A UNIX Command
$ls
1984  2001  2004  2007	2010		 TED-talks-grouped-by-year-in-high-quality.metalink
1990  2002  2005  2008	2011		 ted_urls
1998  2003  2006  2009	ted_download.sh
$cat TED-talks-grouped-by-year-in-high-quality.metalink | grep -w url | wc -l
980
$

UNIX Explanation
This command finds out the  number of lines with the word
"url" in the file TED*.

 

Leave a Reply

Your email address will not be published. Required fields are marked *