[gentoo-user] Escaping a * in bash script
Does anyone know how to go about escaping a * in a bash script? I want to do the following query= select * from table where column1='something' -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Escaping a * in bash script
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ow Mun Heng wrote: Does anyone know how to go about escaping a * in a bash script? I want to do the following query= select * from table where column1='something' As you use the it is still a * in the $query, but you have to be carefull when you use the variable. Try something like dbcommand $query and it will still be a * in your query - -- wabu -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5-ecc0.1.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFKNKSBbWbHb9PeLsRAk2mAJ4psxXuJdNLDUee/lZ3G/Ubr3LFJwCfZe9k CCHlA2M3Dwbmbo5GrAjLCZc= =YKY/ -END PGP SIGNATURE- -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Escaping a * in bash script [SOLVED]
On Sun, 2006-10-08 at 18:13 +0800, Ow Mun Heng wrote: Does anyone know how to go about escaping a * in a bash script? I want to do the following query= select * from table where column1='something' nevermind.. I did it like this query= select \ *\ from table where column1='something' and though it echoes back as select * from when it gets to the SQL server, it's actually select * from oh well.. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Escaping a * in bash script
On 08/10/06, Ow Mun Heng [EMAIL PROTECTED] wrote: Does anyone know how to go about escaping a * in a bash script? I want to do the following query= select * from table where column1='something' Well one you can use different quotes: query='select * from table' Or you can \* it. query=select \* from table Stepping away from bash and into MySQL for a second, why are you selecting *? See google for the debates :) Thanks Mark -- gentoo-user@gentoo.org mailing list