[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: simple text formatting



On Sun, Oct 05, 2003 at 11:37:57PM -0700, Mike Egglestone wrote:
> Hi,
> 
> I have a file in this format of words:
> 
> joe jill bill bob frank tom harry
> 
> and want to convert the file to this format:
> 
> joe
> jill
> bill
> bob
> frank
> tom
> harry
> 

Here's another way:

perl -p040 -e 's/\s/\n/' filename

This works too:

perl -p040 -l12 -e 'chomp' filename

:)


-- 


Paul Talacko



Reply to: