Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jan 2004 23:21:46 +0100
From:      Bernard El-Hagin <zaphod@neostrada.pl>
To:        Gary Kline <kline@thought.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: perl script question.
Message-ID:  <20040110222146.GB711@hoth>
In-Reply-To: <20040110221036.GA44130@tao.thought.org>
References:  <20040110221036.GA44130@tao.thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040110222146.GB711>