Removing asterisks from a file
Ulf Rompe
Ulf.Rompe at icem.com
Thu Oct 16 06:38:33 UTC 2008
Am Donnerstag, den 16.10.2008, 15:51 +1100 schrieb Ranmadhu
Wijayatilaka:
> I have a text file with a bunch of asterisks in it. It is possible to
> remove the asterisks using the command line?
The lightest weight solution might be tr:
tr -d '*' FILENAME > FILENAME_NEW
If you want the new content to be written into the original files and
are absolutely sure about what you do, you may be interested in sed's in
place editing:
sed -i -e 's#*##g' FILENAME
You can also provide a backup extension to "-i" to get backups of
modified files.
[x] ulf
--
Real programmers confuse Christmas and Halloween because
DEC 25 = OCT 31!
More information about the ubuntu-users
mailing list