Oct 29, 2002 #1 goldenradium2001 Technical User Joined Mar 22, 2002 Messages 91 Location US Can anyone give me a good example of how these work?
Oct 29, 2002 1 #2 ecasadella MIS Joined Oct 11, 2002 Messages 57 Location AD test -a file if [ $? -eq 0 ];then echo "file exists" fi EDC Upvote 0 Downvote
Oct 29, 2002 #3 ecasadella MIS Joined Oct 11, 2002 Messages 57 Location AD Sorry I misunderstood It's file1 exists test file1 if [ $? -eq 0 ];then echo "file1 exists" fi file1 exists an file2 doesn't test file1 -o file2 if [ $? -eq 0 ];then echo "one file at least exists" fi file1 exists an file2 doesn't test ! file1 -o ! file2 if [ $? -eq 1 ];then echo "one file at least doesn't exist" fi ! negation operator -a binary and operator -o binary or operator EDC Upvote 0 Downvote
Sorry I misunderstood It's file1 exists test file1 if [ $? -eq 0 ];then echo "file1 exists" fi file1 exists an file2 doesn't test file1 -o file2 if [ $? -eq 0 ];then echo "one file at least exists" fi file1 exists an file2 doesn't test ! file1 -o ! file2 if [ $? -eq 1 ];then echo "one file at least doesn't exist" fi ! negation operator -a binary and operator -o binary or operator EDC
Oct 30, 2002 #4 parbhani Technical User Joined Jul 3, 2002 Messages 125 Location GB In case of ksh , visit http://www.firstalt.co.uk/service/sa/korn_shell/ksh_memo.txt This will explain most of the operators and possibilities Enjoy ......... Upvote 0 Downvote
In case of ksh , visit http://www.firstalt.co.uk/service/sa/korn_shell/ksh_memo.txt This will explain most of the operators and possibilities Enjoy .........