[X-Unix] Sed - remove line numbers

Charles Howse chowse at charter.net
Sat Jan 24 15:37:50 PST 2009


Filipp, Eric,
Thanks very much!  The result of the work is an Applescript that opens  
a new Mail message and inserts a random tagline from that 100 line  
text file...

--
Thanks,
Charles

Reasons it's great to be a guy...
Car mechanics tell you the truth.

--
Thanks,
Charles

Reasons it's great to be a guy...
You can rationalize any behavior with the handy phrase "F*#k it!"

--
Thanks,
Charles

Signs you're getting old...
6:00 AM is when you get up, not when you go to bed.

--
Thanks,
Charles

Signs you're getting old...
Your car insurance goes down and your payments go up.



On Jan 24, 2009, at 5:21 PM, Eric F Crist wrote:

> 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
>
>
>
>
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix



More information about the X-Unix mailing list