Re: Test -a and -e

2009-11-09 Thread Jan Schampera
Chet Ramey schrieb: >> Code: >> $ [ ! -a /bin/bash ] && echo "Doesn't exist"; [ -a /bin/bash ] && echo >> "Exists" >> >> Output: >> Doesn't exist >> Exists > Please read the Bash FAQ, question E1. The behavior of test depends on > the number of arguments; the rules are in the manual page. > >

Re: Test -a and -e

2009-11-09 Thread Chet Ramey
Jan Schampera wrote: > Hello list, > > Code: > $ [ ! -e /bin/bash ] && echo "Doesn't exist"; [ -e /bin/bash ] && echo > "Exists" > > Output: > Exists > > > Code: > $ [ ! -a /bin/bash ] && echo "Doesn't exist"; [ -a /bin/bash ] && echo > "Exists" > > Output: > Doesn't exist > Exists > > > It

Test -a and -e

2009-11-09 Thread Jan Schampera
Hello list, Code: $ [ ! -e /bin/bash ] && echo "Doesn't exist"; [ -e /bin/bash ] && echo "Exists" Output: Exists Code: $ [ ! -a /bin/bash ] && echo "Doesn't exist"; [ -a /bin/bash ] && echo "Exists" Output: Doesn't exist Exists It seems there's a difference between -a and -e, though they are