Re: sed /awk problem

From: noi (noi_at_siam.com)
Date: 03/18/05

  • Next message: Monti R Ciski: "Re: GRUB"
    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???


  • Next message: Monti R Ciski: "Re: GRUB"

    Relevant Pages

    • sed /awk problem
      ... if setup is now then empty then remove it ... THEN if sys is also now empty remove that too ... I'd kinda like to stay with sed or awk because i can understand them to ... but if not then perl is ok too. ...
      (alt.linux)
    • Re: MAX Function Help
      ... Sys. ... Dia. ... With this setup in A2:A11 ... I hope, you can use it, not because I have been patient, ...
      (microsoft.public.excel.worksheet.functions)
    • Re: Error -6002
      ... > Setup has experienced an error. ... > - empty your temporary folder ... > - check your internet connection ...
      (microsoft.public.windowsxp.basics)
    • RE: USBUHCI.SYS causes BSOD
      ... I'm running Xp pro too and am getting the same error message on boot up it says "Microsoft XP Setup.. ... The file USBUCHI .SYS is corrupted. ... Setup failed press any key to restart computer" ...
      (microsoft.public.windowsxp.perform_maintain)
    • Re: Postfix inside a jail
      ... Even though the setup seems flawless, ... /var/log/maillog is empty. ... within a jail or not? ...
      (freebsd-questions)

    Loading