Hi ..
I have an ERP system that uses lpr to print the text output from system.
We have a new printing server that needs a username to print ( using keyfobs to id user)
The user sent by ERP is the same user for all ( Linux application user)
Therefore if 100 different users print docs , the printing server app only sees one user.
A soloution is to output , not to lpr first , but to script.. and use cat to append to the output file , and the printing server can parse out the username.
here's my plan:
current output from ERP
lpr -P$PROFILES$.PRINTER -#$PROFILES$.CONC_COPIES -T"$PROFILES$.TITLE" $PROFILES$.FILENAME
$PROFILES$.USERNAME ( lpr does nothing at present with the username variable which is the variable we need to pass to file)
planned output
print.sh printer1 1 123456file.txt jbloggs
where
print.sh %printername% %copies% %filename% %username%
The script would need to do something like: ( keeping in mind that the output file name is unique and we need to keep this so not to mess up file names...)
cat > output%uniquenum?%.txt
user:%username%
(exit)
cat output%uniquenum?%.txt %filename% >newfilesame_uniquenum?%.t
xt
lpr newfilesame_uniquenum?%.tx
t 1 print1
Sorry for the long question...
Anyone there to assist with correct syntax of file?
Cheers!
Start Free Trial