[ale] Bash scripting question #2

Geoffrey esoteric at 3times25.net
Fri Feb 18 08:13:20 EST 2005


Geoffrey wrote:

> That won't work, that's why I used the '-o' syntax in an earlier post. 
> You can do it this way:
> 
> if [ -f foo ] || [ -f bar ]....
> 
> But that's more typing.. :)

Just tested the following in bash, which was originally a ksh construct:

if [[ -f foo || -f bar ]]; then ....

And it works in bash as well.

-- 
Until later, Geoffrey



More information about the Ale mailing list