When I use inotifywait and then read within the while loop something breaks. I never receive the input the the script just breaks. This is an example:
#!/bin/bash
scriptDir=$(pwd)
get_input() {
read userInput
echo $userInput echod
}
inotifywait -m -e modify,create,delete $scriptDir | while read alterationDetails
do
echo "something changed"
get_input
done
Ideally instead of "get_input" I'd like to be able to call another script which takes input in that while loop. For example:
eval "node inputCatcher.js"