Sep 3, 2003 #1 roger55 Programmer Sep 1, 2003 3 US I tried this command but get a syntax error: if [ ! \( -s $x -ge A600.prn -a -s $x -le A699.prn \) -a ! \( -s $x -ge A800.prn -a -s $x -le A899.prn \) ] then I want to select files that are NOT in these ranges: A600.prn to A699.prn A800.prn to A899.prn
I tried this command but get a syntax error: if [ ! \( -s $x -ge A600.prn -a -s $x -le A699.prn \) -a ! \( -s $x -ge A800.prn -a -s $x -le A899.prn \) ] then I want to select files that are NOT in these ranges: A600.prn to A699.prn A800.prn to A899.prn
Sep 3, 2003 #2 PHV MIS Nov 8, 2002 53,708 FR try something like this: Code: case $x in A[68]???.prn) : Do nothing;; *) [ -s $x ] && Do something;; esac Anyway, man test to realize the syntax error. Hope This Help PH. Upvote 0 Downvote
try something like this: Code: case $x in A[68]???.prn) : Do nothing;; *) [ -s $x ] && Do something;; esac Anyway, man test to realize the syntax error. Hope This Help PH.
Sep 3, 2003 #3 Ygor Programmer Feb 21, 2003 623 GB #!/usr/bin/ksh if [[ $x != A[68][0-9][0-9].prn ]] then echo string does not match pattern fi Upvote 0 Downvote
Sep 3, 2003 #4 PHV MIS Nov 8, 2002 53,708 FR Sorry for the typo, 2 ?s are sufficient. Hope This Help PH. Upvote 0 Downvote