Stupid shell stuff: prepending a character on each line
Don Levey
lug-TwWeWiF2EGRi+ztankeudA at public.gmane.org
Sat Jan 9 19:44:37 EST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bill Bogstad wrote:
>
> sed 's/^/./' -i file-to-change
>
> will add a period to the beginning of every line in the file 'file-to-change'.
>
> I'm not sure if the '-i' option is available on all systems.
>
It is available on my system; looping through each file and executing
this line in my script does the job. Thanks, Bill - and David, with an
alternate solution!
-Don
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFLSSL1iVR8AmYXiFARAo/QAKCOvC2DPN/mJPP+D7Lt9rtfll7kXwCdGI61
hxQG/ImaXJZUoHksdyjDcH8=
=JSv5
-----END PGP SIGNATURE-----
More information about the Discuss
mailing list