[CentOS] Syntax Help on a Bash Script
Robert
bobster58 at gmail.com
Wed May 4 04:52:47 UTC 2011
Thanks for the help thus far. Have tried recommendations on the error
line and still am getting the error. Oh well, its late so I'm going to
stop trying tonight and will take this up again in the AM.
Bob
On 05/03/2011 11:49 PM, Andrew Harley wrote:
> On Tue, 2011-05-03 at 23:33 -0500, Robert wrote:
>> MYSQL='which mysql'
> Also this line should use either backticks or $() command substitution
> instead:
>
> For example:
>
> [andrew at savoy ~]$ MYSQL='which mysql'
> [andrew at savoy ~]$ echo $MYSQL
> which mysql
> [andrew at savoy ~]$ MYSQL=$(which mysql)
> [andrew at savoy ~]$ echo $MYSQL
> /usr/bin/mysql
> [andrew at savoy ~]$ MYSQL=`which mysql`
> [andrew at savoy ~]$ echo $MYSQL
> /usr/bin/mysql
>
> Cheers!
>
> --
>
> Andy
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
More information about the CentOS
mailing list