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

jas-
  • 858
  • 5
  • 8
  • 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 02 '16 at 20:41
  • That is much more elegant. Thanks. I never use pkill. – jas- Oct 02 '16 at 22:20

1 Answers1

-1

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

Jaleks
  • 2,499
  • 1
  • 17
  • 34