Re: quick bash question

Per Kr. Hove (perhov@stud.ntnu.no)
Tue, 18 Feb 1997 22:56:51 +0100 (MET)


On 18 Feb 1997, Amy wrote:

> > #! /bin/bash
> > if [ some_string="blah" ]; then
> ^ you need a space between these
> Amy :)

Wrong. He needs one space on each side of the equal sign.

This is perfectly legal:
if [ some_string = blah ];then
: whatever
else
: do something else
fi

per kristian