--- Weitergeleitete Nachricht / Forwarded Message --- Date: Tue, 11 Jan 2005 17:35:48 +0530 (IST) From: Bharathi S <sbharathi@xxxxxxxxxxxxx> To: Indian Linux Users Group - Chennai <ilugc@xxxxxxxxxxxxx> Subject: [Ilugc] One Day One Command One Day One Command :- --------------------- grep -- (Global Regular Expression Print) Print lines matching a pattern Summary: `grep' searches the input files for lines containing a match to a given pattern list. Grep has a no .of useful options and support regular expressions. Examples: $ grep -i bharathi Midas.txt -- Print the lines which contains string "bharathi" in the Midas.txt file $ grep -v bharathi ILUGC.txt -- Print the line which is not the string "bharathi" $ grep "^A" file -- Prints the line starting with A. $ grep "Z$" file -- Prints the line with ending letter Z. $ grep -c "Linux" file -- Prints count of match. $ grep '^[012]' file -- Prints the line starting with 0/1/2 Read : info grep / egrep / fgrep Bye :) -- Bharathi S -- A proud GNU user http://gnukid.5gigs.com/ | http://www.joesteeve.tk/ PS: This is insecure mail. If you have problems please request for a secure confirmation. +++ Sparen Sie mit GMX DSL +++ http://www.gmx.net/de/go/dsl AKTION für Wechsler: DSL-Tarife ab 3,99 EUR/Monat + Startguthaben -- GLUGOT = GNU/Linux User Group Of TCE visit: http://www.glugot.tk / (TCE students, check TCENet for GLUGOT website)