waffle.horn@googlemail.com wrote:
>
> Im trying to remove two types of rogue characters but I can't seem to
> think of the correct solution with sed. The characters Im trying to
> remove are the @ and ` characters shown below
>
> -0.1000@-0.1000
>
> -0.1000`-0.1000
>
> I have tried...
>
> sed 's/@/ /' FILENAME | sed 's/`/ /'
>
> It doesn't seem to work for all instances. Any idea would be much
> appreciated
If you want to remove them:
tr -d '@`' < FILENAME
If you want to replace them with a space like your example shows:
tr '@`' ' ' < FILENAME
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall