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

Re: simple text formatting



On Mon, 2003-10-06 at 07:37, 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
> 
> Is there an easy way to this? The file I have has hundreds of entries.

for word in `cat file`
do
	echo $word
done > new_file

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Blessed is the man that walketh not in the counsel of 
      the ungodly, nor standeth in the way of sinners, nor 
      sitteth in the seat of the scornful. But his delight 
      is in the law of the LORD; and in his law doth he 
      meditate day and night."         Psalms 1:1,2 



Reply to: