![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Extracting a string from one file and searching the same string in other files | mohancrr | Shell Programming and Scripting | 1 | 09-19-2007 03:17 AM |
| searching text files on specific columns for duplicates | Gerry405 | UNIX for Dummies Questions & Answers | 2 | 08-18-2005 10:51 AM |
| Searching for data on a specific line numbers | rkumar28 | Shell Programming and Scripting | 8 | 06-18-2005 12:34 AM |
| Searching for a specific phrase on Unix server | mmcaleer | UNIX for Dummies Questions & Answers | 1 | 02-07-2005 04:18 PM |
| Searching for a specific string in an argumnet | dinplant | Shell Programming and Scripting | 1 | 03-11-2002 03:28 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
ppl,
this is my "file" with fields orderno orderdate orderdesc telno street city 1 01/04/2006 abc 123 100 tampa 2 01/04/2006 abc 123 100 tampa 3 01/04/2006 abc 123 100 tampa 4 01/04/2006 abc 123 100 tampa 5 01/04/2006 abc 123 100 tampa 6 01/04/2006 abc 123 100 tampa searching for lines with ordernos 3,4 and 5 in a loop as: ll=3 ul=5 while [ $ll -le $ul ] do grep '^$ll\>' file ll=$((ll+1)) done gives me null output. pls help with the correct expression to retrieve the required lines. UNDERLINE.. the key to search is only the first field.. all other fields are same and can't be used. (p.s. however the expression is working with substituted values of $ll (if i hard code $ll with 3, 4 or 5.. i get correct results) Thanks a lot in advance, Sirisha |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|