Re: Syntax Help on a Bash Script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, May 03, 2011 at 11:33:52PM -0500, Robert wrote:
> 
> #!/bin/bash
> # send data to the table in the MySQL database
> 
> MYSQL='which mysql'

You want "MYSQL=$(which mysql)"

>       If [ $? -eq 0 ]
>       then
>            echo "Data successfully added"
>       else
>            echo "Problem adding data"
>       fi

"If" is incorrect.




							John

-- 
<zu22> Hellow: bears are wonderful animals
<zu22> I love bears!
<zu22> I want to feed them marshmellows.

Attachment: pgpZWfzEiSSHe.pgp
Description: PGP signature

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux