send " ' " (single quote character) via system command?
Bill Campbell
bill at celestial.com
Sat Dec 6 11:45:59 PST 2014
On Fri, Dec 05, 2014, James Flanagan wrote:
>FreeBSD 9.2
>Filepro 5.7.0.03
>I am trying use the sed command to modify a template html file, but the
>single quotes are not being passed properly via the system command. is
>there a way to send the single character through properly to the system
>command? thank you very much in advance.
>
>:exists(html_file) eq "0":unix="cat /www/template.html | sed \'s/XXXXX/"{1{"/g\' >"<html_file:
>::msgbox unix:
That script is a good example of the useless use of cat, and
wouldn't work in any case with a < redirect and a pipe.
I would put your sed into a script then call the script avoiding
any quoting issues.
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186 Skype: jwccsllc (206) 855-5792
Never blame a legislative body for not doing something. When they do
nothing, that don't hurt anybody. When they do something is when they
become dangerous. -- Will Rogers
More information about the Filepro-list
mailing list