LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.



fgrep

fgrep [options] string [files]

Search one or more files for lines that match the specified text string. Exit status is 0 if any lines match, 1 if not, and 2 for errors. fgrep is faster than normal grep searches, but less flexible: it can only find fixed text, not regular expressions.

See grep for the list of available options. Also see egrep.

Examples

Print lines in file that don't contain any spaces:

fgrep -v ' ' file

Print lines in file that contain the words in the file spell_list:

fgrep -f spell_list file


Linux Resources
  • Linux Online
  • The Linux FAQ
  • linux.java.net
  • Linux Kernel Archives
  • Kernel Traffic
  • DistroWatch.com


  • Sponsored by: