Re: perl code to remove newlines

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



John Doe wrote:
 
> $ cat $FILE | tr "\n" " " | sed 's/ *></>\n</g'

I was yearning for someone to chime with that!
sed is clearly the best & most straightforward way to do
this task.

I can't help myself - there's a "useless use of cat":

$ < $FILE tr "\n" " " | sed 's/ *></>\n</g'

http://www.partmaps.org/era/unix/award.html#uucaletter
-- 
"Pedantic, I?" -- Alexei Sayle

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux