Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to check the file existence using shell scripting in Solaris-10

807557Nov 24 2007 — edited Nov 24 2007
Hi,

I have a script which will check the fiel existence, the lines are as below

if !(test -d ./data) then
mkdir data
fi

In the first line error occurs as below

generatelicense.sh: syntax error at line 2: `!' unexpected

Where as this script works fine in linux OS.

How to solve it?............................


Regards
Revathi

Edited by: krevathi1912 on Nov 24, 2007 2:14 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 22 2007
Added on Nov 24 2007
1 comment
259 views