Re: shell script question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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.

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux