-1

I have been trying to accomplish a simple scheduled task in Solaris 11 with the use of the at command.

Example:

$> kill $(ps -ef | grep -v grep | grep truss | awk '{print $2}') | at now + 1 minute; truss -fp 1706 &

Anyone have any insight?

  • 1
    At wants a command line as input; you've provided the output of kill (which is likely an empty string) as its input. You can probably do something much simpler, like (sleep 60; pkill truss)& – Mark Plotnick Oct 2 '16 at 20:41
  • That is much more elegant. Thanks. I never use pkill. – jas- Oct 2 '16 at 22:20
-1

I think you should instead have a look at the timeout command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.