Re: Modifying strings in a file.

From: Fabrice Guerini (fabrice@BLUEMARTINI.COM)
Date: Wed Aug 28 2002 - 15:07:58 EDT


On 11:40 AM 8/28/2002, Ron Schwingel uttered:

> Find string: #Word1 Word2 Word3 Word4
>
> Replace with: Word1 Word2 Word3 Word4

sed -e 's/^#Word1 Word2 Word3 Word4/Word1 Word2 Word3 Word4/' file > /tmp/file
mv file file.orig
mv /tmp/file file

+===========================================================+
| Fabrice "Script It!" Guerini Blue Martini Software, Inc. |
| Senior Operations Engineer 2600 Campus Drive |
| Tel: (650) 356-7576 San Mateo, CA 94403-2522 |
| Fax: (650) 356-4001 www.bluemartini.com |
+===========================================================+



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:10 EDT