Trying to run an IF statement on two machines-
1.SunOS 5.8 Generic_Virtual sun4u sparc SUNW,Sun-Fire-V240 (bash)
2.SunOS 5.10 Generic_127112-11 i86pc i386 i86pc (tcsh)
The command which I run from shell -
if ( echo 13 | grep -w
date +%e
>/dev/null ) ; then echo "present" ; fi
It runs fine on machine 1. But get following error on machine 2 (tcsh)-
if: Expression Syntax.
How can I correct this in tcsh ? I need to run this from a crontab file-
30 09 * * * if ( echo 13 | grep -w
date +%e
>/dev/null ) ; then echo "present" ; fi