However I need to prompt the user for a single input from within the shell script on the Linux server.
The script works when run from the CLI under linux but under windows when invoked through plink I get prompted but the screen freezes and nothing works.
This is the Windows batch code:
Code: Select all
@ECHO OFF
:BEGIN
START plink.exe 192.168.1.199 -l root -pw test sh /root/site_down
:END
Code: Select all
#!/bin/bash
echo "Enter the number of hours the site will be down: "
read -e HOURS
echo "Site down for $HOURS hours"