Thread: Unix Tools
View Single Post

   
  #11 (permalink)  
Old 01-17-2008, 08:36 AM
Ed Morton
 
Posts: n/a
Default Re: Unix Tools



On 10/24/2003 11:55 AM, Stephane CHAZELAS wrote:
> 2003/10/24, 10:12(-05), Ed Morton:
> [...]
>
>>You never need to do pipe things between sed and awk since awk
>>can do anything sed can do.

>
> [...]
>
> Not always. Even GNU awk can't do easily things that sed can
> do in one line.


In the part you snipped, I quoted the OP as saying:

>> But Perl has been described as doing more than sed and awk
>> together, removing the need to pipe things around between the two


I suppose I should've emphasised the "need" part more. Of course I agree that
sed can do some things more easily than awk but I don't think I've ever piped
them together and I don't expect I'll ever need to. Not to say I wouldn't do it
if appropriate for a quick-and-easy hack. In any case, I was really contrasting
the abilites of awk vs perl in this context rather than contrasting sed vs awk.

> There's no equivalent for 'y' in awk.


Good to know, though I've never used it in sed either. I'm more of a "tr" guy...

Ed.

Reply With Quote