autoconf
[Top][All Lists]
Advanced

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

Re: [FYI] {master} maint: assume 'test -x' is portable


From: Harlan Stenn
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
Date: Thu, 23 Feb 2012 20:42:32 -0800

Eric wrote:
> Instead of 'rm -f $list', you have to use
> 'test -n "$list" || rm -f $list'.

This may also not be an issue any longer, but (many) years ago I learned
(probably from Larry Wall) to avoid using 'test -n ...' when possible,
as it was too often *not* a shell builtin and therefore was a
performance hog as a subshell was spawned.  I routinely use 'case'
statements instead of any tests for (non-)empty strings.

H



reply via email to

[Prev in Thread] Current Thread [Next in Thread]