Hi all
I need to use awk command to start my script file after 1 second and
stop the same script after 2 hours on my root .
My script name is ABC
how can I do that ?
Thanks for helping
Rema
Hi all
I need to use awk command to start my script file after 1 second and
stop the same script after 2 hours on my root .
My script name is ABC
how can I do that ?
Thanks for helping
Rema
Why awk?
sleep 1
./ABC
sleep 7200
pkill ABC
Thank you balajesuri for answer me
yes , your code is working I know that
but i need awk command because I learn it
You would be much better off learning how to use the shell directly rather than using awk to invoke the shell to run your commands, but if you absolutely insist on doing it the hard and inefficient way:
awk 'BEGIN{exit system("sleep 1;./ABC&sleep 7200;pkill ABC")}'
Thank you Don Cragun very much