site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Share Topic
Posting?
Post a:
Post a:
Links: ·Forum FAQ ·Attitude Adjustment ·Linux docs ·DistroWatch ·OPLM
AuthorAll Replies

Uraki
Uraki
Premium
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.


Brano
I hate Vogons
Premium,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 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


Tuesday, 18-Jun 21:52:56 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 13.5 years online © 1999-2013 dslreports.com.
Most commented news this week
Hot Topics