12 Example of Grep Command in Unix
12 Example of Grep Command in Unix
grep -l ERROR *.log grep -l 'main' *.java will list the names of all Java files in the current directory whose contents mention `main'.
12) at last there are three version of grep command in UNIX `grep, fgrep, egrep'. `fgrep' stands for Fixed `grep', `egrep' Extended `grep use it based on your need.
Summary
These examples of grep command in UNIX are something which I use on daily basis; I have seen more sophisticated use of grep with regular expression. I will list some more examples of grep command in UNIX as I come across and find useful to share. As per my experience having good hold on grep and UNIX find command with knowledge of regular expression will be great for you day to day life if you need to look log files or config files or need to do production support on electronic trading systems or any other kind of system which is running on UNIX. This list of grep command in UNIX is by no means complete and I look forward from you guys to share how you are using grep command in UNIX.
Author
Name: Javin Paul Website: http://javarevisited.blogspot.com/2011/06/10http://javarevisited.blogspot.com/2011/06/10examples-of-grep-command-in-unixexamples-of-grep-command-in-unix-and.html Javin Paul is an expert in the area of Java, Unix and TIBCO RV and and has been working with these technology from past 7 years while working in various project in finance and trading domain.