On Thu, 15 Jul 2004 06:49:20 PDT, Sean writes: >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; > >:%s/^[a-z]:[0-9]/#/g > >but this would CHANGE the first character of each line >to a hash, pls help.
:%s/^/\#/g , although that obviously doesn't care if the first character already is a # sign. You'd probably need backrefernces for that, which I know nothing about. cheers, &rw -- / Ing. Robert Waldner | Security Engineer | CoreTec IT-Security \ \ <[EMAIL PROTECTED]> | T +43 1 503 72 73 | F +43 1 503 72 73 x99 /
pgpRfWFeIRgFF.pgp
Description: PGP signature