How to append filepro generated text to the first line of a filepro generated file.

Brian K. White bw.aljex at gmail.com
Fri May 1 11:59:01 PDT 2020


Are the report and the string generated from the same process?
Is the report generated from clerk, or report?
Is the header string known at the start, or does it contain data (email 
address) that comes from the report and you don't know the header string 
until after running the report?

There are 100 ways to do that but the right way depends on the existing 
context to pick a way that fits best.

For instance I would say use file io or jsfile commands in fp in @once 
to write the first line, then use formm to append the rest of the pages. 
No sed or awk or any other shell commands. But that requires clerk, and 
you're probably using report.

Is there a parent shell script that you can add stuff to naturally for 
post-processing like that, or were you going to do it by adding a 
system() command somewhere? Because in the case of system(), native fp 
code is available and would be better than a system() command. In the 
case of a parent shell script, I wouldn't sed or awk or anything, I'd 
just cat, or echo & cat.

I can go into more detail after knowing more, to pick a set of details 
that make any sense.

-- 
bkw


On 5/1/20 1:51 PM, oldtony via Filepro-list wrote:
> The file generation is on Linux.  P is a windows share folder. Also 
> using the GREAT ANZIO Printwizard.
>
> filepro generates a file for me (a text file of a printout). file is 
> P:\files\prt\wolfprt
>
> filepro generates this string for me:     !PDF 
> /fP:\files\prt\wolfprt.pdf /email="tony at ynotsoftware.com /j"this is a 
> test"
>
> When i manually edit the file P:\files\prt\wolfprt  and put this 
> string as the first line of the file P:\files\prt\wolfprt i get the 
> desired results. That is, when i copy the edited file to Print Wizard 
> despool directory a email is sent to me with the report is attached as 
> a PDF file.
>
> the string filepro generates has lots of special characters. which has 
> caused issues for me
>
> i want to do a system call using something like AWK or sed to add this 
> string as the first line of the file p:\files\prt\wolfprt.
>
> I am hoping one of you experts will help
>
> thanks
>
> Old Tony
>



More information about the Filepro-list mailing list