2017-01-03 101 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 &