Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

job id/#

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hello everyone.

anybody knows how to capture a print job ID or #? like in a script? or what aix parameters/constant that need to be capture.
 
lp -d [device] [file_to_print] |tee /tmp/printjob
cat /tmp/printjob |cut -f2 -d":"|awk {'print $1'}

You can leave off the awk pipe, as it only serves to remove the leading space in the print job number.

Bill.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top