Problem with mutt version.sh script

Vincent Lefevre vincent at vinc17.org
Thu Apr 19 18:24:43 UTC 2018


On 2018-04-17 14:28:17 -0500, Derek Martin wrote:
> One wonders what systems these are, and whether this is even worth
> considering.  If it is, I believe Bourne shell allows compound tests
> like the following: 
> 
>   [ -f $file -o -d $file ]

AFAIK, -o is not portable and has been marked obsolescent.
You should write:

  [ -f "$file" ] || [ -d "$file" ]

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the Mutt-dev mailing list