If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > something wrong in shell

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-16-04, 04:32
tanaka tanaka is offline
Registered User
 
Join Date: Sep 2003
Location: Chiang Mai Thailand
Posts: 14
Post something wrong in shell

I try to make backup script.
That generate dump file are named by schema-date.dmp

my script as followed

MF=MS-$(date +%d%m%y).dmp

exp system/passwd owner=xman file='/'$MF

I test first by type to command line.
everthing ok .
But when I run it from script
it show me

syntax error at line 1: `MF=MS-$' unexpected

how can I fix this
I use solaris9 on sun-fire280

Can you help me ?
kindly regards
thana p.
Chaing mai Thailand
__________________
Kindly regards,
Thana p.
Chiangmai Thailand
Yim_cm@hotmail.com
Reply With Quote
  #2 (permalink)  
Old 01-16-04, 07:07
TimoV TimoV is offline
Registered User
 
Join Date: Dec 2003
Posts: 56
Try putting single quotes aroun the date command like so:

MF=MS-`date +%d%m%y`.dmp

Above should work for a ksh script
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On