grep

grep definition - computer

(Global Regular Expression and Print) A Unix pattern matching utility that searches files for a string of text and outputs the line that contains the pattern. Grep came from ed, a Unix text editor, in which the command g/re/p meant "display all text in the file that matches this." That single function became a utility program itself, available in Unix, Linux, Windows and Mac environments.

The following example uses grep to find occurrences of the text "xfiles.lst" within any .CMD files in the default folder. The result shows the file name and the line of text that contains "xfiles.lst." See ed.

  grep command:  grep xfiles.lst *.cmd

  grep result:   File PREPCDPX.CMD
                 copy \stage\code\xfiles.lst
                 File SETSTAGE.CMD
                 copy \stage\code\xfiles.lst





Computer Desktop Encyclopedia THIS DEFINITION IS FOR PERSONAL USE ONLY
All other reproduction is strictly prohibited without permission from the publisher.
Copyright © 1981-2009 by Computer Language Company Inc. All rights reserved.

Comments
Improve this definition.
Do you have more to add? Share your linguistic knowledge or observation.
/Register to save your comments.