Let there is a file while.sh and dir vikas
[root@vikas Desktop]# test -e while.sh
[root@vikas Desktop]# echo $?
0
[root@vikas Desktop]# test -e while
[root@vikas Desktop]# echo $?
1
[root@vikas Desktop]# test -d vikas
[root@vikas Desktop]# echo $?
0
[root@vikas Desktop]# test -d vikass
[root@vikas Desktop]# echo $?
1
[root@vikas Desktop]# test -e while.sh && echo "Yes." [if file is there echo yes]
Yes.
[root@vikas Desktop]# test -e whiless.sh && echo "Yes."
[root@vikas Desktop]# test -e whiless.sh || echo "no." [if file is not there echo no]
no.
[root@vikas Desktop]# test -e while.sh || echo "no."
[root@vikas Desktop]#
No comments:
Post a Comment