On 02/13/2015 11:47 PM, Always Learning wrote:
I re-ran the script with 'set -x' for
16 if [ $file='law00css' ]
17 then
18 echo $file
19 echo "css"
20 else
21 echo "no css"
22 fi
and received:-
+ '[' law45p07a01=law00css ']'
+ echo law45p07a01
law45p07a01
+ echo css
css
Correct. You invoked the test command with a single argument, the
string "law45p07a01=law00css". With a single argument, the test is
just whether that argument in non-null, which it is. To perform
a comparison you need 3 separate arguments (2 operands and an
operator), not 1.
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
_______________________________________________
CentOS mailing list
[email protected]
http://lists.centos.org/mailman/listinfo/centos