Re: Help with a Unix script for...

From: Richard W. McKay (rmckay@EXECPC.COM)
Date: 10/28/97


On Tue, 28 Oct 1997, SJM wrote:

> 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


Personally I would use the vi editor to do this.  With the file oen in vi
($vi <filename>), do a global substitution with this command line:

%s/^\+//g

This will strip all of the +'s that are at the begining of a line.

If you need more help, email me personally.

Later!

Richard McKay
rmckay@execpc.com



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

-----
Richard Mc Kay
rmckay@execpc.com
http://www.execpc.com/~rmckay

    Out of my mind.  Back in 5 minutes.


     +------------------------------------------------------------+
     | 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