<div dir="auto"><div>If you send the output through a pipe, rather than direct to a filename, the shell gets involved and will expand environment variables:</div><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif">printer7=txt,nocodes,|cat >/home/$LOGNAME/</span><span style="font-family:sans-serif">report.txt</span></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">This is one of the rare cases where a "useless use of cat" isn't so useless.</font></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">Laura Brody</font></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">On Sat, Aug 11, 2018, 2:14 PM James Flanagan via Filepro-list <<a href="mailto:filepro-list@lists.celestial.com">filepro-list@lists.celestial.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Filepro 5.7.00.09D4<br>
FreeBSD 10.3<br>
<br>
What I am trying to is something like the following so that printer’s output destination is controlled by the value of a variable. Otherwise I would need to define a separate printer for each user, which is too unwieldily. And yes, I realize, I could print to a single destination, such as /tmp and then use a system command to move the file with appropriate variable right afterwards (which is actually what I am doing now). However, if possible, I would much prefer to be able to have the printer conditionally put the output directly where it is intended to go, all in a single step. <br>
<br>
Is this possible in Filepro? The 2 examples below do NOT work and the variables are treated as actual values, and not what the variable represents. <br>
<br>
printer7=txt,nocodes,>/home/@id/report.txt<br>
<br>
Or <br>
<br>
printer7=txt,nocodes,>home/$LOGNAME/report.txt<br>
<br>
Thank you very much, in advance. <br>
<br>
<br>
James Flanagan<br>
Flantec.com <<a href="http://flantec.com/" rel="noreferrer noreferrer" target="_blank">http://flantec.com/</a>><br>
<br>
email: James@Flantec.com <mailto:<a href="mailto:James@Flantec.com" target="_blank" rel="noreferrer">James@Flantec.com</a>><br>
mobile: 760-458-8498<br>
home: 219-221-6219<br>
text: <a href="mailto:7604588498@txt.att.net" target="_blank" rel="noreferrer">7604588498@txt.att.net</a> <mailto:<a href="mailto:7604588498@txt.att.net" target="_blank" rel="noreferrer">7604588498@txt.att.net</a>><br>
<br>
Skype: Flantec<br>
ichat: James@Flantec.com <mailto:<a href="mailto:James@Flantec.com" target="_blank" rel="noreferrer">James@Flantec.com</a>> <br>
<br>
home: 1901 Cidermill Road<br>
Michigan City, IN 46360<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20180811/109c481f/attachment.html" rel="noreferrer noreferrer" target="_blank">http://mailman.celestial.com/pipermail/filepro-list/attachments/20180811/109c481f/attachment.html</a>><br>
_______________________________________________<br>
Filepro-list mailing list<br>
<a href="mailto:Filepro-list@lists.celestial.com" target="_blank" rel="noreferrer">Filepro-list@lists.celestial.com</a><br>
Subscribe/Unsubscribe/Subscription Changes<br>
<a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" rel="noreferrer noreferrer" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br>
</blockquote></div></div></div>