Re: Help with a Unix script for...

From: Edward Glamkowski (EGlamkowski@MATHEMATICA-MPR.COM)
Date: 10/28/97


How about a perl script? :)

while (<>) {
  if (/^+/) { s/^+\s*//g; }
}


Edward Glamkowski, Programmer           Mathematica Policy Research
EGlamkowski@mathematic-MPR.COM          Princeton, NJ
                http://www.mathematica-mpr.com/

            Please, please, provide me with my daily helping of
               preposterous and pretentious platitudes, waiter.


>----------
>From:  SJM[SMTP:meadsh@ECE.ORST.EDU]
>Sent:  Tuesday, October 28, 1997 11:15 AM
>To:    CIRCLE@post.queensu.ca
>Subject:        Help with a Unix script for...
>
>Hello, I have a file that has over 6500 lines of code I want to use but
>almost every line has a '+' in front of it.  The code is from a patch
>file that I couldn't get to patch so I am doing it manually.  Can anyone
>help me with a simple unix script that will filter out these '+'s?
>Maybe to read in the first character of every line and if it is a '+'
>then delete it, otherwise move on to the next line.  Or does anyone know
>an easier way?
>
>-Shaw
>
>
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>     +------------------------------------------------------------+
>


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST