When I've run into situations like this I just set up vars to hold the chars I need
DQ = '"' SQ = '"' BS = '/' ASTRING = BS:'HELLO MA BABY ':SQ:DQ:'GAL':DQ:SQ:BS ---- Larry Hiscock <lar...@wcs-corp.com> wrote: ============= Oops ... missed something at the end. Try this: sh -c "mysql --user username -e ":QUOTE("LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE INTO TABLE database.updates FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (Emailaddress, Reference) SET UpdateType = 'D', DateAdded = current_timestamp(); LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE INTO TABLE database.updates FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (Emailaddress, Reference) SET UpdateType = 'A', DateAdded = current_timestamp();"):" database" --Larry -----Original Message----- From: Larry Hiscock [mailto:lar...@wcs-corp.com] Sent: Thursday, June 17, 2010 10:43 AM To: 'U2 Users List' Subject: RE: [U2] I've run out of "quotes" Use the QUOTE() function, thusly: sh -c "mysql --user username -e ":QUOTE("LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE INTO TABLE database.updates FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (Emailaddress, Reference) SET UpdateType = 'D', DateAdded = current_timestamp(); LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE INTO TABLE database.updates FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (Emailaddress, Reference) SET UpdateType = 'A', DateAdded = current_timestamp();") database" Larry Hiscock Western Computer Services -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Thursday, June 17, 2010 10:30 AM To: U2 Users List Subject: Re: [U2] I've run out of "quotes" that doesn't help. I'm passing is: mysql --user username -e "LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE INTO TABLE database.updates FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (Emailaddress, Reference) SET UpdateType = 'D', DateAdded = current_timestamp(); LOAD DATA infile '/mnt/mount/FILE.TXT' REPLACE INTO TABLE database.updates FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (Emailaddress, Reference) SET UpdateType = 'A', DateAdded = current_timestamp();" database I can't think of anyway to escape anything, and still not confuse UV. George > -----Original Message----- > From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- > boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock > Sent: Thursday, June 17, 2010 1:22 PM > To: 'U2 Users List' > Subject: Re: [U2] I've run out of "quotes" > > You can usually escape any given character passed to the shell by > preceding > it with a backslash. In other words: > > To pass a quote: \" > To pass a backslash: \\ > > Etc. > > Larry Hiscock > Western Computer Services > > > -----Original Message----- > From: u2-users-boun...@listserver.u2ug.org > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George > Gallen > Sent: Thursday, June 17, 2010 10:15 AM > To: U2 Users List > Subject: [U2] I've run out of "quotes" > > OK....How do I setup a > > sh -c .... when what I want to pass has in it, single quotes, double > quotes and backslashes? > > > George Gallen > Senior Programmer/Analyst > Accounting/Data Division, EDI Administrator > ggal...@wyanokegroup.com > ph:856.848.9005 > begin_of_the_skype_highlighting 856.848.9005 end_of_the_skype_highlighting > Ext 220 > The Wyanoke Group > http://www.wyanokegroup.com > > > > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users