hi all, If I have a shell script on 5.1 that has 2 commands in the script... command1 command2 and command1 runs until it is kill'ed by some other process. Sometimes command2 runs and sometimes it doesnt (this is what it seems like). How can I be ensured that command2 will always run after command1 is killed? The script is not killed just command1. Thanks, jerry
On Thursday 13 March 2008 22:04:23 Jerry Geis wrote:> If I have a shell script on 5.1 that has 2 commands in the script... > > command1 > command2 > > and command1 runs until it is kill'ed by some other process. Sometimes > command2 runs and sometimes it > doesnt (this is what it seems like). > > How can I be ensured that command2 will always run after command1 is > killed? The script is not killed > just command1.Does command1 always need to be killed? How about: command1 && command2 ? -- Fajar Priyanto | Reg'd Linux User #327841 | Linux tutorial http://linux2.arinet.org 22:29:55 up 10 min, 2.6.22-14-generic GNU/Linux Let's use OpenOffice. http://www.openoffice.org The real challenge of teaching is getting your students motivated to learn. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: <http://lists.centos.org/pipermail/centos/attachments/20080313/e48df67f/attachment-0002.sig>
On Thu, Mar 13, 2008 at 11:04:23AM -0400, Jerry Geis alleged:> hi all, > > If I have a shell script on 5.1 that has 2 commands in the script... > > command1 > command2 > > and command1 runs until it is kill'ed by some other process. Sometimes > command2 runs and sometimes it > doesnt (this is what it seems like). > > How can I be ensured that command2 will always run after command1 is > killed? The script is not killed > just command1.In this example, command2 will always run after command1. The script must be getting killed. -- Garrick Staples, GNU/Linux HPCC SysAdmin University of Southern California Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20080313/dcc1f991/attachment-0002.sig>
On Thu, Mar 13, 2008 at 12:04 PM, Jerry Geis <geisj at pagestation.com> wrote:> hi all, > > If I have a shell script on 5.1 that has 2 commands in the script... > > command1 > command2 > > and command1 runs until it is kill'ed by some other process. Sometimes > command2 runs and sometimes it > doesnt (this is what it seems like). > > How can I be ensured that command2 will always run after command1 is > killed? The script is not killed > just command1.if command1;then true;fi command2 -- Marcelo "?No ser? acaso que ?sta vida moderna est? teniendo m?s de moderna que de vida?" (Mafalda)
Possibly Parallel Threads
- Why are the arguments supplied for the command run through ssh interpreted by shell before they are passed to the command on the server side?
- [LLVMdev] [cfe-dev] [3.7 Release] RC1 has been tagged, Testing Phase I begins
- YALAQ - Yet Another LApply Question
- samba4 gpo update problem
- samba4 gpo update problem