Automator does not allow keyboard input of data when requested by a running script or program
Automator step 1: Get Selected Finder Item (which is a shell script called readInput.sh that is dragged onto the Automator icon to become arg $1):
#!/bin/sh
read myline
echo $myline
Automator step 2: Run Shell Script (using arguments) which has:
cd Desktop
echo "Using: $1" > $HOME/Desktop/Results.txt
echo `date` >> $HOME/Desktop/Results.txt
echo " " >> $HOME/Desktop/Results.txt
chmod +x readInput.sh
"$1" >> $HOME/Desktop/Results.txt 2>&1
echo "Shell Script is completed" >> $HOME/Desktop/Results.txt
open -a TextEdit $HOME/Desktop/Results.txt
Automator step 1: Get Selected Finder Item (which is a shell script called readInput.sh that is dragged onto the Automator icon to become arg $1):
#!/bin/sh
read myline
echo $myline
Automator step 2: Run Shell Script (using arguments) which has:
cd Desktop
echo "Using: $1" > $HOME/Desktop/Results.txt
echo `date` >> $HOME/Desktop/Results.txt
echo " " >> $HOME/Desktop/Results.txt
chmod +x readInput.sh
"$1" >> $HOME/Desktop/Results.txt 2>&1
echo "Shell Script is completed" >> $HOME/Desktop/Results.txt
open -a TextEdit $HOME/Desktop/Results.txt