Sorry everyone, I found the problem. Syntax attempt #27 (or thereabouts) worked by having a space after [ and before ]. if [ "$6" == 'F' ] > -----Original Message----- > From: fedora-list-bounces@xxxxxxxxxx > [mailto:fedora-list-bounces@xxxxxxxxxx]On Behalf Of Graham Cossey > Sent: 21 October 2004 16:06 > To: FEDORA LIST > Subject: Help with first bash script please > > > I'm going nowhere at the moment with this VERY simple bash script, can > someone help please? > > All I need to do is check the value of one of the command line parameters > and conditionally perform a task > > 1 #!/bin/bash > 2 printf "Type = $6" > 3 if [$6 == 'F'] > 4 then > 5 Do the task > 6 fi > 7 Do other tasks > > I keep getting: > > Type = Q > line 3: [Q: Command not found > > Also, does someone have a 'simple' bash scripting resource they > could point > me to? I can find plenty of advanced scripting pages but founf > nothing with > the above example that worked. > > TIA > > Graham > > > -- > fedora-list mailing list > fedora-list@xxxxxxxxxx > To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list >