LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2012, 01:49 AM   #1
bal_nair
LQ Newbie
 
Registered: Apr 2012
Posts: 9

Rep: Reputation: Disabled
Smile 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?
 
Old 04-09-2012, 01:56 AM   #2
roger_heslop
Member
 
Registered: Oct 2009
Location: Leander, TX
Distribution: Fedora 20
Posts: 97

Rep: Reputation: 35
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(?)
 
Old 04-09-2012, 02:18 AM   #3
bal_nair
LQ Newbie
 
Registered: Apr 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
real-time signals cause program termination miles_christian Programming 2 08-21-2006 11:59 PM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 05:29 AM
Question about abnormal program termination ghoughto Programming 5 06-15-2005 08:04 AM
shell script - trap program termination dnijaguar Linux - Software 0 07-19-2003 01:27 AM
Random program termination - odd jamespetts Linux - General 4 11-01-2002 05:55 PM


All times are GMT -5. The time now is 04:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration