send " ' " (single quote character) via system command?
James Flanagan
James at Flantec.com
Sat Dec 6 14:38:16 PST 2014
ok, I may have accidentally not included all the code to make myself clear. my apologies.
::html_file="/www/"{5{"/"{1{".html":
:exists(html_file) eq "0":unix="cat /www/template.html | sed \'s/XXXXX/"{1{"/g\' >"<html_file:
::msgbox unix:
:exists(html_file) eq "0":system noredraw unix:
The msgbox command is just there for troubleshooting. when i test it, I get the following in the msgbox:
cat /www/template.html | sed 's/XXXXX/wcpc1/g' > /www/wcc/wcpc1.html
Copying and pasting the output of the msgbox does work properly to achieve the intended goal. however, the command when run from the system command, results in an empty destination file. that tells me that system command is processing the command all the way to the end, and is getting tripped up on the single quote (or possibly the pipe) somewhere in the middle.
so my question again is there a way to send such a command and have the filepro system command pass it to the system properly? thank you very much,
James Flanagan
Flantec.com <http://flantec.com/>
email: James at Flantec.com <mailto:James at Flantec.com>
mobile: 760-458-8498
home: 219-221-6219
text: 7604588498 at txt.att.net <mailto:7604588498 at txt.att.net>
aim: Flantec
oovoo: Flantec
Skype: Flantec
ichat: Flantec at mac.com <mailto:Flantec at mac.com>
home: 1901 Cidermill Road
Michigan City, IN 46360
> On Dec 6, 2014, at 2:44 PM, Kenneth Brody <kenbrody at spamcop.net> wrote:
>
> On 12/6/2014 2:45 PM, Bill Campbell wrote:
>> On Fri, Dec 05, 2014, James Flanagan wrote:
>>> FreeBSD 9.2
>>> Filepro 5.7.0.03
> [...]
>>> :exists(html_file) eq "0":unix="cat /www/template.html | sed \'s/XXXXX/"{1{"/g\' >"<html_file:
>>> ::msgbox unix:
>
> You don't say what doesn't work. (I assume you actually have a SYSTEM command somewhere?)
>
>> 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.
>
> Nit:
>
> There is no "< redirect". The "<" is the filePro concatenate-and-leave-one-space operator.
>
> Dropping the useless-cat, this should work (though I'm not on a *nix system at the moment to test it):
>
> unix = "sed 's/XXXXX/" { 1 { "/g' </www/template.html >" { html_file
>
> Again, the OP doesn't explain what "doesn't work".
>
>> I would put your sed into a script then call the script avoiding
>> any quoting issues.
>
>
> --
> Kenneth Brody
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20141206/3bf4c06d/attachment.html>
More information about the Filepro-list
mailing list