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}'
Written by Allan Kent
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Awk
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#