Last Updated: February 25, 2016
·
373
· allankent

Actual command scheduled by at

I have some once off jobs scheduled to run through at, and wanted to see what the scheduled command was.

atq returns a job id, when it is scheduled to run and who the owner is.

at -c <jobid> returns a large chunk of text. The last (non-blank) line of which is the actual command that was passed through to at.

So, to return the last, non-blank line of the output:

at -c <job id> | awk 'NF > 0' | awk 'END{print}'