2017-01-03 106 views
0

如何在背景中同時運行12個bash腳本?在後臺運行intotify sricpt

這就是腳本:

#/bin/bash 

while inotifywait -e close_write /var/www/html/wp-content/QM-Handbuch /01-Inhaltsverzeichnis.doc; 

    do  soffice --headless --convert-to pdf /var/www/html/wp-content/QM-Handbuch/01-Inhaltsverzeichnis.doc && 
      sudo mv /var/www/html/wp-content/QM-Handbuch/01-Inhaltsverzeichnis.pdf /var/www/html/wp-content 

回答

0

使用符號(&),你可以在後臺運行的bash腳本。

語法: -

<prompt> $ bash <file name> & 

實施例: -

<prompt> $ bash inotify.sh &