Re: sed problem

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

 



I think "tr" does this even easier (IMHO of course ;)

hal:~ # echo "This|should|be|on|separate|lines" | tr \| \\n
This
should
be
on
separate
lines





I think awk fits better for this task, IMHO of course :-)

csoler@gudu$ echo "This|should|be|on|separate|lines" | awk -F"|" '{for

(i=1; i<= NF; i++) print $i}'
This
should
be
on
separate
lines

I hope this helps you...

Cheers,
César

-
: send the line "unsubscribe linux-
admin"
in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux