Re: Help with a Unix script for... 97 08:15:03 am

From: Nynaeve Al'Meara (nynaeve@PIONEER.EUNET.FI)
Date: 10/29/97


Hi Shaw,

> 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

The '+' -marks mean that line should be added compared to the original file
that's supposed to be patched.

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

If you use vi -the editor, the following command will remove any + -marks
in the beginning of the line:

%s/^+//

Try that ;) (just make a backup first :)

--
Nynaeve


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