Mailinglist Archive: opensuse (2488 mails)

< Previous Next >
Re: [opensuse] Bash script help needed
  • From: Brian Jackson <brian@xxxxxxxxxxxxxxxxxxxxx>
  • Date: Mon, 5 Feb 2007 10:17:00 -0800
  • Message-id: <200702051017.02276.brian@xxxxxxxxxxxxxxxxxxxxx>
On Monday 05 February 2007 10:15, Jan Karjalainen wrote:
> How do I go through a text file and add ",on" at the end of each
> line?

perl -pi -e 's/$/,on/' [your list of files]
or
find . -name "*txt" | xargs perl -pi -e 's/$/,on/'

--
Brian Jackson Photo
Sports ~ People ~ Events
http://www.BrianJacksonPhoto.com
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
References