![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Display file without # lines | dave123 | Shell Programming and Scripting | 5 | 06-28-2008 01:22 PM |
| Display lines of the file on a log | sbryant | Shell Programming and Scripting | 2 | 02-26-2008 02:16 PM |
| How to delete first 5 lines and last five lines in all text files | ragavendran31 | Shell Programming and Scripting | 10 | 02-21-2008 07:58 AM |
| display all lines | shary | Shell Programming and Scripting | 3 | 02-17-2007 04:09 PM |
| display few lines of the file | sharuvman | UNIX for Dummies Questions & Answers | 4 | 04-27-2004 08:14 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi All, please help me to display 5 continious lines from a particular text. my file is as below. file1.txt ------ Code:
Good 1 2 3 4 5 luck 1 2 3 I want to diplay 5 lines from the word Good. I tried the below command Code:
grep -A5 "Good" file1.txt I got the below error message Code:
grep: illegal option -- A
grep: illegal option -- 5
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] -e pattern_list...
[-f pattern_file...] [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] [-e pattern_list...]
-f pattern_file... [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] pattern [file...]
please help me to over come this issue. Thanks! Last edited by Franklin52; 09-29-2009 at 07:07 AM.. Reason: Please use code tags! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|