what is called GREP in UNIX

what is called GREP in UNIX

Postby Suja » Tue Mar 06, 2012 3:20 am

what is called GREP in UNIX

Rao , Your Class in Unix amazing today thanks
Posts: 1
Joined: Tue Mar 06, 2012 3:07 am

Re: what is called GREP in UNIX

Postby nuthan » Wed Mar 07, 2012 4:50 pm

"grep" is a command used to search for text in a file. grep stands for "Global/ Regular Expression /Print".
It is very useful to analyze large data or log files on UNIX.


grep H2K h2kstudents.txt

This command will print lines containing H2K from h2kstudents.txt file. By default, grep is case sensitive so in this case it will ignore lines containing h2K or H2K or h2k. To change this behavior of grep, options can be used. Option -i enables case INsensitive search that is,

grep -i h2k h2kstudents.txt

Like -i option there are other options which can be used with grep command.
Posts: 2
Joined: Wed Jan 25, 2012 4:02 am

Return to UNIX | Linux

Who is online

Users browsing this forum: No registered users and 2 guests