Removing asterisks from a file

H.S. hs.samix at gmail.com
Thu Oct 16 05:29:53 UTC 2008


Ranmadhu Wijayatilaka wrote:
> Hi all,
> I have a text file with a bunch of asterisks in it. It is possible to 
> remove the asterisks using the command line? I tried using echo and sed 
> but the echo command simply outputs all the files in the current 
> directory when it gets up to an asterisks.
> 
> Thanks,
> Ranmadhu
> 

The following will remove asterisks from a file called foo.txt
$> perl -p -i -e "s/\*//g;" foo.txt

Or, the following will do the same but keep the original as foo.txt.bk
$> perl -p -i.bk -e "s/\*//g;" foo.txt


-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.





More information about the ubuntu-users mailing list