I would like the following job to run via root cron ;
LOGF="/usr/local/erp/oraerp/ss.log"
su - newuser -c "date
for fil in `ls /mydir/*.sh`
do
sh $fil >> $LOGF
done
date"
The job must do the following steps ;
1 Show date
2. for each file in the mydir
executre the file
3. Show date
I get this error ;
ksh: syntax error at line 2 : `/mydir/st2.sh' unexpected
LOGF="/usr/local/erp/oraerp/ss.log"
su - newuser -c "date
for fil in `ls /mydir/*.sh`
do
sh $fil >> $LOGF
done
date"
The job must do the following steps ;
1 Show date
2. for each file in the mydir
executre the file
3. Show date
I get this error ;
ksh: syntax error at line 2 : `/mydir/st2.sh' unexpected