Re: removing rogue characters with sed
Thank you both examples seemed to do the trick. The is much
appreciated as are the explanations.
On May 27, 8:06 pm, "John W. Krahn" <some...@example.com> wrote:
> waffle.h...@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.1...@-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
|