![]() |
|
|
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 |
| a better way to grep until end of error message, although most seem to be 1 or 2 line | VGR | Shell Programming and Scripting | 11 | 05-09-2009 03:41 PM |
| Is there a better way to grep until end of error message? | VGR | UNIX for Advanced & Expert Users | 1 | 05-07-2009 10:52 AM |
| error in grep | ragha81 | Shell Programming and Scripting | 6 | 12-27-2006 03:15 PM |
| grep error | Dave724001 | UNIX for Dummies Questions & Answers | 2 | 11-07-2006 06:48 AM |
| grep error message | gammaman | UNIX for Dummies Questions & Answers | 3 | 07-11-2005 12:58 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Quote:
What exactly rare you trying to grep. Can you paste it here? cheers, Devaraj Takhellambam |
|
||||
|
An e.g
# # #20090508234729# # # # # # # # # #7#919855198983# #71# #1758#1613# # # #serv:pps7a;vers:1;pid:0;af:3;vid:1117980591288184;Dvl:0;serType:0;recType:1000;a mt:0;costType:1# I am trying to grep "1117980591288184" in the above string. I have more then thousand different numbers to grep in a very large file. I want to know when does this error occurs in particular, because the data i am getting after grep is correct but still the grep code is throwing an error......y is it so? for reference below is the code:- while IFS= read -r line do grep -h "$line" /user2/200905/20090508*.znf >>/home/yesterday.txt; done < /home/hrn_20090508.txt |
|
||||
|
Probably, it is caused when trying to evaluate the grep string read from the file as a regular expression. Does the file have empty lines... I suggest you use Code:
egrep -h "$line" /user2/200905/20090508*.znf >>/home/yesterday.txt 2>/dev/null cheers, Devaraj Takhellambam |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|