Run a intotify sricpt in background

529 views Asked by At

how can i run 12 bash scripts simultaniously in the backgroud?

That's the script:

#/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
1

There are 1 answers

0
sureshkumar On

Using the ampersand(&) you can run the bash scripts in background.

Syntax:-

   <prompt> $ bash <file name> &

Example:-

   <prompt> $ bash inotify.sh &