samedi 18 avril 2015

chaining bash command with double ampersand - unexpected behavior


Vote count:

0




The following works well



[root]# killall httpd

[root]# service httpd start
Starting httpd: [ OK ]

[root]# service httpd status
httpd (pid 2987) is running...


The following is supposed to work like above, but it's not



[root]# killall httpd && service httpd start
Starting httpd:

[root]# service httpd status
httpd is stopped


Note that here it didn't return the [OK] signal for starting httpd.


What is going wrong?


Do bash commands by ampersand chaining run asynchronously?


How can i make sure that they run synchronously one AFTER another?



asked 15 secs ago

syedrakib

1,454






chaining bash command with double ampersand - unexpected behavior

Aucun commentaire:

Enregistrer un commentaire