Gregory Seidman <[EMAIL PROTECTED]> [2003:10:06:07:21:02-0400] scribed:
> 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
> } 
> } Is there an easy way to this? The file I have has hundreds of entries.
> 
> The various for loop solutions are miserably inefficient and are overly
> complex. The sed solution is almost reasonable. This is the simplest and
> cleanest solution, however:
> 
> tr ' ' '\012' < infile > outfile

Assuming, of course, that *all* whitespace is exactly one (1) character
wide, and that *no* whitespace is a tab . . .

-- 
Best Regards,

mds
mds resource
877.596.8237
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to