Chris F.A. Johnson wrote:
On Mon, 23 Aug 2010, Dennis Williamson wrote:

If you're writing a Bash-specific script then it's preferable to use
double square brackets (see http://mywiki.wooledge.org/BashFAQ/031).

if [[ -f $file ]]
then
   do something
fi

   I'd avoid non-portable syntax unless it offers a significant
   advantage over standard syntax.

   [[ ... ]] is not standard, and offers little over the standard
   syntax.

[[ ... ]] is POSIX, isn't it? As such there should be enough portability and standard syntax to warrant the advantage.

Bye, Jojo

Reply via email to