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

Re: Sed or Awk Question

Jody Grafals wrote:

> Dose anyone know how to replace a line break with a space using sed or
> awk?
> for example 
> cat
> dog 
> goat 
> duck 
> would become 
> cat dog goat duck 

This should do, and it's simpler than either sed or awk:

    tr '\n' ' '


Attachment: pgpb7J39KKnYs.pgp
Description: PGP signature

Reply to: