LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Automatica excecution of shell scripting on termination of a program (https://www.linuxquestions.org/questions/linux-newbie-8/automatica-excecution-of-shell-scripting-on-termination-of-a-program-938828/)

bal_nair 04-09-2012 12:49 AM

Automatica excecution of shell scripting on termination of a program
 
i just want to excecute a script automatically when a program terminates.How that could be done? and how to have popups through shell scripting?

roger_heslop 04-09-2012 12:56 AM

One way you could get a shell script to execute on the termination of a program, would be by calling that program through a script itself. If this is done the shell is idle while the program executes, then continues normal flow when the program ends. Using a shell as this kind of wrapper would allow you to write different flows based on the exit status of the program (see echo $?) -Edit: Kind of a hack I know, but it's the only way I could think to do something like this-

Pop ups on the other hand, I'm not sure how to do through bash(?)

bal_nair 04-09-2012 01:18 AM

Thank you ...I want the script to be idle when the program runs and immediately get excecuted on the termination on the excecution of that program, without writing more than one script.


All times are GMT -5. The time now is 05:48 PM.