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 > If statement syntax error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-01-04, 10:12
sjumma sjumma is offline
Registered User
 
Join Date: Oct 2003
Posts: 232
Arrow If statement syntax error

I was trying out if statement with 2 files already existing
#/bin/sh
if [ -w all ]
then
cat newscript >> pld
if [ $? -eq 0 ]
then
echo "Succesfull appended filename all"
else
echo "Failed to append new data"
fi
fi

i get an error
if : expression syntax


Any suggestion thanks
__________________
bigfoots
Reply With Quote
  #2 (permalink)  
Old 10-01-04, 10:23
vgersh99 vgersh99 is offline
Registered User
 
Join Date: Apr 2004
Location: Boston, MA
Posts: 325
try:

#!/bin/sh
Reply With Quote
  #3 (permalink)  
Old 10-01-04, 12:01
sjumma sjumma is offline
Registered User
 
Join Date: Oct 2003
Posts: 232
Dammmmmmmmmmmmmm Me


thanks
__________________
bigfoots
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