Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


More on LinuxToday


More Fun With Bash Quoting

Nov 24, 2009, 12:32 (2 Talkback[s])
(Other stories by Mitch Frazier)

"...case in point: trying to script the updating of a field in a mysql table when the field to be changed contains quote characters.

"Let's imagine we have a simple table with the following data and we would like to change the name field:

+----+----------------------+---------------------+
| id | name                 | create_date         |
+----+----------------------+---------------------+
|  1 | name 'with' "quotes" | 2009-11-19 08:48:59 |
+----+----------------------+---------------------+

"Your first script might look something like this:"

Complete Story

Related Stories: