[plug] Simple bash scripting problem (again)

Craig Ringer craig at postnewspapers.com.au
Mon Oct 10 20:51:29 WST 2005


Timothy White wrote:

>	if [ $ARTIST == "" ]; then
>  
>
This line won't do what you expect if $ARTIST is the empty string; you 
probably meant "$ARTIST".

>		  ARTIST = `echo $file | cut -d- -f1`
>  
>
The shell is fussy about spaces around the = operator, so this won't 
work like you expect.

$ ARTIST = fred
bash: ARTIST: command not found
$ ARTIST=fred
$

--
Craig Ringer



More information about the plug mailing list