[X-Unix] Sed - remove line numbers
Eric F Crist
ecrist at secure-computing.net
Sat Jan 24 15:21:22 PST 2009
On Jan 24, 2009, at 5:09 PM, Filipp Lepalaan wrote:
> Probably not the most efficient way of doing it, but:
>
> cat filename | sed -E 's/^[0-9]+\. //' | tr -s '\n'
The only good way I can see to clean this up would be to do the
following:
sed -E 's/^[0-9]+\. //' filename | tr -s '\n'
No reason to cat, since sed can pull the file in, and it will output
it, by default to stdout, where you can grab it with tr.
---
Eric Crist
More information about the X-Unix
mailing list