Jan 26, 2007 #1 Yarka Technical User Jan 14, 2007 192 ES Hi, how i can put a condition after another one. I do; if [ [ ${a} -eq 1 ] && [ ${b} -eq 1 ] ]; then but this doesn't work to me. Thanks.
Hi, how i can put a condition after another one. I do; if [ [ ${a} -eq 1 ] && [ ${b} -eq 1 ] ]; then but this doesn't work to me. Thanks.
Jan 26, 2007 1 #2 SamBones Programmer Aug 8, 2002 3,186 US Try... Code: if [[ ${a} = 1 && ${b} = 1 ]]; then Upvote 0 Downvote
Jan 26, 2007 Thread starter #3 Yarka Technical User Jan 14, 2007 192 ES Thank you very much, it works well. Upvote 0 Downvote
Jan 29, 2007 #4 PHV MIS Nov 8, 2002 53,708 FR Another legacy way: if [ "$a" -eq 1 -a "$b" -eq 1 ]; then Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
Another legacy way: if [ "$a" -eq 1 -a "$b" -eq 1 ]; then Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886