bash errorif: Expression Syntax

J. Qiang Li shijialee-/E1597aS9LQAvxtiuMwx3w at public.gmane.org
Sat Dec 10 17:59:28 UTC 2005


> > hello, all
> > 
> > i have a simple bash script that giving me problem under solaris.
> > 
> > run "source my_script", got error: "if: Expression Syntax" 
> 
> Why are you using source?  sh/bash uses . not source.  csh uses source
> and you can't source an sh/bash script when running csh.  

you are mostly right. but 'source' works for bash as well, just not sh based on the book 'unix
power tools'.

anyway, took bit of time to find a good reference on various bourne shell. problem solved by using
the correct test. this is a good read http://www.in-ulm.de/~mascheck/bourne/

James.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list