unexpected operator .sh error
aiza21 at comclark.com
Tue Jun 1 02:58:46 UTC 2010
Chris Hill wrote:
> On Tue, 1 Jun 2010, Aiza wrote:
>> Added some code to a .sh script.
>> When I run the script works but issues this message
>> [: =: unexpected operator
>> No line number telling where to look.
>> I am not ever sure its talking about.
>> IS [: whats wrong or =:
> I'd guess that what you added includes something like
> if [ x=y ]
> The open-square-bracket, [, is another name for test. IIRC the equal
> sign is not valid in that context.
> Can you post the 'before' and 'after' versions of that part of your
> script? It would help us in determining what the problem is.
> Chris Hill chris at monochrome.org
That hint got me to the correct line
I had if [$1 = "basejail" ]; then
I changed it to if $1 = "basejail"; then
and got error msg =: not found
More information about the freebsd-questions