The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 10-10-2008
mrx1350 mrx1350 is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 23
Quote:
Originally Posted by cfajohnson View Post

That looks as if it's being executed by a non-standard shell rather than by ksh. You can use the old-fashioned form of command substitution:

Code:
NOW=`date +%Y%m%d`
... but you should figure out why it is not using ksh.

How are you calling the script?
i was calling the shell using the sh before the script. for instance sh file.sh.

I tried the other way you suggested and worked fine. thanks.