On Thu, Jul 15, 2004 at 10:05:43PM -0500, Patrick Albuquerque wrote: > From: Sean <[EMAIL PROTECTED]> Date: Thursday, July 15, 2004 8:49 > am Subject: vi globally append question > > > hi all, > > > > i have a file like; > > > > # one 123 > > > > and i would like to APPEND a # at the beginning of each line which > > is not started with a # . how can i do it with vi or ed, so far, i > > 've tried; > > This is neatest, I think > > :g!/^#/ s/^/#/
Well...... That may be neat but I doubt it will work in vi. It may very well work in vim or elvis or some other enhanced clone of vi but that's not quite the same thing. -- "There may be times when we are powerless to prevent injustice, but there must never be a time when we fail to protest." -- Elie Wiesel, writer, Nobel laureate (1928- ) Rick Pasotto [EMAIL PROTECTED] http://www.niof.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]