perl script question.
Bernard El-Hagin
zaphod at neostrada.pl
Sat Jan 10 14:25:40 PST 2004
Gary Kline wrote:
>
> Folks,
>
> Let's see if perl can do this one; it's as obscure a task
> as I've run into. I have scores of files with:
>
> A regular sentence, or phrase. then_one_containing_underscores_-
> between_each_word Followed by another regular, space-delimited
> sentence. Followed_by_another_string_with_underscaores.
>
> Is there a perl way to get rid of the
> string_containing_underscores and leave the regular sntences??
>
> Any thoughts very welcome!!
Perhaps this will be enough:
% perl -i.bak -pe 'tr/_/ /' <files>
--
Cheers,
Bernard
More information about the freebsd-questions
mailing list