: !/bin/sh ######################################################## # get current bill period eval `rptdates tm sfd | awk '{printf("SDATE=\"%s\"; EDATE=\"%s\"", $1, $2)}'` echo "SDATE=[$SDATE] EDATE=[$EDATE]" #MMYYYY="MMYYYY" MMYYYY=`SDATEtoMMYYYY $SDATE` echo "MMYYYY = [$MMYYYY]" #billeriod="MMM_YYYY" billperiod=`MMYYYYtobillperiod $MMYYYY _` echo "$MMYYYY - billperiod = [$billperiod]" #-------------------------------------- INPARPARDIR="indata/$billperiod" ## move to ex folder (currently in topdat/common) #echo "Moving to ex folder." #cd ../.. echo "Moving to $INPARPARDIR" cd "$INPARPARDIR" #--------------------------------------- # list curently uploaded files echo "infile|infiledetail|" infilemask="*/*/?????_*" for infile in `ls $infilemask` do echo "infile=[$infile]" nchars=`wc -c "$infile" | awk '{ print $1 }'` nlines=`wc -l "$infile" | awk '{ print $1 }'` echo "nchars=[$nchars]" echo "nlines=[$nlines]" fdetail=`ls -alt "$infile" | cut -c31- | \ awk -v "nchars=$nchars" -v "nlines=$nlines" ' { printf("%10d, %6d,", nchars, nlines) for (i=2;i<=NF;++i) printf("%s %s", (i==5)?",":"", \$i) }'` echo "fdetail=[$fdetail]" echo "" #echo "$infile|$fdetail|" done exit