![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| check position of end of line(URGENT PLS) | evvander | Shell Programming and Scripting | 6 | 11-11-2007 02:46 PM |
| check position of end of line for some specific lines | senthil_is | Shell Programming and Scripting | 1 | 11-08-2007 10:19 PM |
| how to check a word in a file and assign to a variable | hippo2020 | Shell Programming and Scripting | 1 | 06-28-2007 09:00 AM |
| Change Position of word character | cedrichiu | Shell Programming and Scripting | 6 | 03-11-2007 10:52 PM |
| Can a shell script pull the first word (or nth word) off each line of a text file? | tricky | Shell Programming and Scripting | 5 | 08-17-2006 03:29 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
||||
|
||||
|
Thanks for pointing that out. This should lay such issues to rest:
Code:
$ cat file window 0 truck 3 duck 2 spitfire 8 fire 1 backfire 9 $ sed 's/.*\<fire\> \([0-9][0-9]*\).*/\1/' file 1 $ sed 's/.*\<spitfire\> \([0-9][0-9]*\).*/\1/' file 8 $ sed 's/.*\<window\> \([0-9][0-9]*\).*/\1/' file 0 $ sed 's/.*\<backfire\> \([0-9][0-9]*\).*/\1/' file 9 |
||||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|