 UrakiUrakiPremium join:2003-06-22 Belle Plaine, KS | reply to Brano
Re: grep (awk, sed) help »www.theunixschool.com/2012/06/se···-or.html
Check out #23 in the list, exactly what you want, I think. |
|
 BranoI hate VogonsPremium,MVM join:2002-06-25 Burlington, ON kudos:6 Reviews:
·Bell Fibe
| Ok guys, thank you for all 3 examples.
The awk posted by Black Box and the sed posted by Uraki are doing what I need. pablo your is not producing desired output (or I'm doing something wrong).
In any case, mission accomplished, thank you all for help. |
|
 pabloMVM join:2003-06-23 kudos:1 | Did you try invoke sed as I mentioned in my last post? "sed -n -f the-script-file input-file-1 input-file-2 ... etc"
Thx! -pablo |
|
 | reply to Brano For the sake of completeness, I'll mention that the whole script can be put in a file (let's say myfilter) that if made executable can be executed directly. I takes the same parameters as awk, so if invoked myfilter input.txt it will filter the input.txt file and put the filtered output on the standard output. Pipe or redirect as you wish ;).
-- Keep It Safe, Stupid! Yes, I CanChat. Can You? |
|
 pabloMVM join:2003-06-23 kudos:1 | Funny you mention that Black Box as offline, I mentioned the same Brano ... 
Incidentally, the issue why my sed script wasn't working was resolved. The Regular Expression Brano used didn't cover the input file. 
Cheers, -pablo -- openSUSE 12.2/KDE 4.x ISP: TekSavvy Bonded DSL; backhauled via a 6KM wireless link Assorted goodies: »pablo.blog.blueoakdb.com |
|