Re: sed /awk problem
From: noi (noi_at_siam.com)
Date: 03/18/05
- Previous message: Leon Haverly: "FEDORA 3 & BURNING WITH NERO 6.6"
- In reply to: Eric: "sed /awk problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 18 Mar 2005 18:13:53 GMT
On Fri, 18 Mar 2005 01:03:42 -0800, Eric thoughtfully wrote:
> I've been trying to figure out how to do this:
> suppose i have this in a file:
>
> sys {
> setup() is also {
> someFn(run, tick_max, 100000);
> };
> };
>
>
> i want to remove someFn (sed '/tick_max/d' works for that) THEN
> if setup is now then empty (it might contain other fns) then remove it
> THEN if sys is also now empty remove that too
>
> Caveats:
> There could be blank lines anywhere in this set Any of these lines might
> contain trailing "//" style comments at the end There could be leading
> tabs and trailing whitespace/tabs There could be lines with only
> comments
>
> I've got to change a lot of these files and I'm working on a script to do
> it. I'd kinda like to stay with sed or awk because i can understand them
> to some degree, but if not then perl is ok too. Thanks
> Eric
What???
- Previous message: Leon Haverly: "FEDORA 3 & BURNING WITH NERO 6.6"
- In reply to: Eric: "sed /awk problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|