|
Glenn,
I removed the braces in between date field but i am surprised how the value of filecount is 2 here. See the debug output once I remove the braces between date field in the script.
myfilepattern=BARE01_DLY
+ typeset -i filecount=0
+ filecount=0+1
+ filecount=1+1
+ let 2 == 10
+ print failure
failure
+ exit 1
Here is the script;
#!/bin/ksh
dir=/biddf/ab6498/dev/ctl
export dir
set -x
myfilepattern=$@
integer filecount=0
for file in $myfilepattern_???_date +%Y%m%d ; do
filecount=$filecount+1
done
if (( $filecount == 10 )); then
print "success"
exit 0
else
print "failure"
exit 1
fi
|