in reply to Prepending characters to lines in file

perl -i.bak -pe 's/$_/> $_/' filename
could be one way

Replies are listed 'Best First'.
Re: Re: Prepending characters to lines in file
by chipmunk (Parson) on Aug 03, 2001 at 07:10 UTC
    That will work as long as your lines don't contain regex metacharacters. :)

    You don't really need to match the line itself; just matching the beginning of the line works fine: perl -pi.bak -e 's/^/> /' filename