On Wed, Mar 24, 2010 at 09:10:48PM -0500, Ed Ahlsen-Girard wrote:
> 
> I'm sure there is a case in which sed should be used instead of perl,
> but I haven't run across it yet.

I've encountered two cases over the past 20 years.
1) Perl is not installed and probably will never be installed.
That ceased to be the case about 10 years ago, and then started
being the case again as folks started replacing the firmware
on consumer grade routers.

2) The time to load perl from disk and the memory consumed doing
so would create a significant load on the system if run every minute.
But that was in the days of perl4.
But in the end I opted for the awk implementation.  The implementation
was readable :-).

And that leads to my gripe...
What is a case of something where sed should be used instead of
awk or some iteration of var2="${var1##*/}" and related constructs.
I do know that the use of var2=`echo $var1 | sed -e 's,^.*/,,` 
has a high correlation with gems like
if [ -z $var ]; then ...


-- 
Chris Dukes

Reply via email to