[CentOS] Why does 'test -f' and 'test -e' return true on a (hidden) file that doesn't exist?
Stephen Harris
lists at spuddy.orgMon Mar 31 21:11:05 UTC 2008
- Previous message: [CentOS] Why does 'test -f' and 'test -e' return true on a (hidden) file that doesn't exist?
- Next message: [CentOS] Why does 'test -f' and 'test -e' return true on a (hidden) file that doesn't exist?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Mar 31, 2008 at 01:37:01PM -0700, Tim Alberts wrote: > Why does 'test -f' and 'test -e' return true on a (hidden) file that > doesn't exist? > > *> cat /home/talberts/.forward* > cat: /home/talberts/.forward: No such file or directory > *> test -f /home/talberts/.forward ;echo $?* > 1 > *> test -e /home/talberts/.forward ;echo $?* > 1 "0" means true % test 1 == 1 ; echo $? 0 % test 1 == 2 ; echo $? 1 % test 1 == 1 && echo good good (BTW, putting * around lines you type is REALLY bad quoting style) -- rgds Stephen
- Previous message: [CentOS] Why does 'test -f' and 'test -e' return true on a (hidden) file that doesn't exist?
- Next message: [CentOS] Why does 'test -f' and 'test -e' return true on a (hidden) file that doesn't exist?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list