I'm writing and simple bash script:
#! /bin/bash
echo "IP: $1"
sshpass -p 'pass' ssh -t -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$1 << EOF
cd ../
sed -i -e 's/x=false/x=true/g' file.txt
echo "*** x has changed! ***"
cat file.txt
EOF
I run the script like this:
bash test.sh ip (I enter some server IP).
The script works but I get this message in the terminal:
IP: ip
stty: standard input: Inappropriate ioctl for device
*** x has changed! ***
x = true
Why does the stty message appear? what does it mean and how can I make it disappear? (I try some suggestions that I found on web, but nothing helped).
Thanks!
Add
bashto avoid loading initialization files :You don't seem to need
-t, so use-T