dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
8
share rss forum feed


Brano
I hate Vogons
Premium,MVM
join:2002-06-25
Burlington, ON
kudos:11
Reviews:
·TekSavvy DSL
·Bell Fibe
reply to Uraki

Re: grep (awk, sed) help

Ok guys, thank you for all 3 examples.

The awk posted by Black Box See Profile and the sed posted by Uraki See Profile are doing what I need.
pablo See Profile your is not producing desired output (or I'm doing something wrong).

In any case, mission accomplished, thank you all for help.

pablo
MVM
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


Black Box

join:2002-12-21
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?

pablo
MVM
join:2003-06-23
kudos:1
Funny you mention that Black Box See Profile as offline, I mentioned the same Brano See Profile ...

Incidentally, the issue why my sed script wasn't working was resolved. The Regular Expression Brano See Profile 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