Skip to content

Instantly share code, notes, and snippets.

@meelih
Created February 12, 2017 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meelih/441f16174971fbdf9266ccab958d32d6 to your computer and use it in GitHub Desktop.
Save meelih/441f16174971fbdf9266ccab958d32d6 to your computer and use it in GitHub Desktop.
#!/bin/bash
addresses=`cat addresses.txt`
while IFS= read -r ip
do
ssh user@"$ip" 'ls
cd /tmp
pwd
touch a
echo "merhaba" > a
cat a
'
done <<< "$addresses"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment