Re: Syntax Help on a Bash Script

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



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@savoy ~]$ MYSQL='which mysql'
[andrew@savoy ~]$ echo $MYSQL
which mysql
[andrew@savoy ~]$ MYSQL=$(which mysql)
[andrew@savoy ~]$ echo $MYSQL
/usr/bin/mysql
[andrew@savoy ~]$ MYSQL=`which mysql`
[andrew@savoy ~]$ echo $MYSQL
/usr/bin/mysql

Cheers!

--

Andy

_______________________________________________
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