James,<div><br></div><div>Try using the file open/ write command or jsfile to create a text file and then use the system command to run it with:</div><div><br></div><div>system "/bin/sh"<filename</div><div><br></div><div>Ken<span></span><br><br>On Sunday, 7 December 2014, James Flanagan <<a href="mailto:James@flantec.com">James@flantec.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ok, I may have accidentally not included all the code to make myself clear. my apologies.<br>
<br>
::html_file="/www/"{5{"/"{1{".html":<br>
:exists(html_file) eq "0":unix="cat /www/template.html | sed \'s/XXXXX/"{1{"/g\' >"<html_file:<br>
::msgbox unix:<br>
:exists(html_file) eq "0":system noredraw unix:<br>
<br>
<br>
The msgbox command is just there for troubleshooting. when i test it, I get the following in the msgbox:<br>
<br>
cat /www/template.html | sed 's/XXXXX/wcpc1/g' > /www/wcc/wcpc1.html<br>
<br>
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.<br>
<br>
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,<br>
<br>
<br>
<br>
James Flanagan<br>
Flantec.com <<a href="http://flantec.com/" target="_blank">http://flantec.com/</a>><br>
<br>
email: James@Flantec.com <mailto:<a href="javascript:;" onclick="_e(event, 'cvml', 'James@Flantec.com')">James@Flantec.com</a>><br>
mobile: 760-458-8498<br>
home: 219-221-6219<br>
text: <a href="javascript:;" onclick="_e(event, 'cvml', '7604588498@txt.att.net')">7604588498@txt.att.net</a> <mailto:<a href="javascript:;" onclick="_e(event, 'cvml', '7604588498@txt.att.net')">7604588498@txt.att.net</a>><br>
<br>
aim: Flantec<br>
oovoo: Flantec<br>
Skype: Flantec<br>
ichat: <a href="javascript:;" onclick="_e(event, 'cvml', 'Flantec@mac.com')">Flantec@mac.com</a> <mailto:<a href="javascript:;" onclick="_e(event, 'cvml', 'Flantec@mac.com')">Flantec@mac.com</a>><br>
<br>
home: 1901 Cidermill Road<br>
Michigan City, IN 46360<br>
<br>
> On Dec 6, 2014, at 2:44 PM, Kenneth Brody <<a href="javascript:;" onclick="_e(event, 'cvml', 'kenbrody@spamcop.net')">kenbrody@spamcop.net</a>> wrote:<br>
><br>
> On 12/6/2014 2:45 PM, Bill Campbell wrote:<br>
>> On Fri, Dec 05, 2014, James Flanagan wrote:<br>
>>> FreeBSD 9.2<br>
>>> Filepro 5.7.0.03<br>
> [...]<br>
>>> :exists(html_file) eq "0":unix="cat /www/template.html | sed \'s/XXXXX/"{1{"/g\' >"<html_file:<br>
>>> ::msgbox unix:<br>
><br>
> You don't say what doesn't work. (I assume you actually have a SYSTEM command somewhere?)<br>
><br>
>> That script is a good example of the useless use of cat, and<br>
>> wouldn't work in any case with a < redirect and a pipe.<br>
><br>
> Nit:<br>
><br>
> There is no "< redirect". The "<" is the filePro concatenate-and-leave-one-space operator.<br>
><br>
> Dropping the useless-cat, this should work (though I'm not on a *nix system at the moment to test it):<br>
><br>
> unix = "sed 's/XXXXX/" { 1 { "/g' </www/template.html >" { html_file<br>
><br>
> Again, the OP doesn't explain what "doesn't work".<br>
><br>
>> I would put your sed into a script then call the script avoiding<br>
>> any quoting issues.<br>
><br>
><br>
> --<br>
> Kenneth Brody<br>
> _______________________________________________<br>
> Filepro-list mailing list<br>
> <a href="javascript:;" onclick="_e(event, 'cvml', 'Filepro-list@lists.celestial.com')">Filepro-list@lists.celestial.com</a><br>
> Subscribe/Unsubscribe/Subscription Changes<br>
> <a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20141206/3bf4c06d/attachment.html" target="_blank">http://mailman.celestial.com/pipermail/filepro-list/attachments/20141206/3bf4c06d/attachment.html</a>><br>
_______________________________________________<br>
Filepro-list mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'Filepro-list@lists.celestial.com')">Filepro-list@lists.celestial.com</a><br>
Subscribe/Unsubscribe/Subscription Changes<br>
<a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br>
</blockquote></div>