January 2001
Intermediate to advanced
480 pages
7h 22m
English
This is the Korn shell version of the Unix grep command. The –b option is not supported, and the –i flag causes multi-character expressions to be matched in both all upper-case or all lower-case (kgrep –i AbC test matches AbC, abc, or ABC in test, but not aBc or other permutations). Here are the supported options:
| –c | display the number of lines that contain the given pattern |
| –i | ignore case of letters during comparison (see above) |
| –l | display only names of files with matching lines once |
| –n | display the output with line numbers |
| –s | do not display error messages |
| –v | display all lines, except those that match the given expression |
#!/bin/ksh # # kgrep - Korn Shell grep program # # Declare default flags CFLAG= ...
Read now
Unlock full access