-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?

2
  • 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)& Commented Oct 2, 2016 at 20:41
  • That is much more elegant. Thanks. I never use pkill.
    – jas-
    Commented Oct 2, 2016 at 22:20

1 Answer 1

-1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .