Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #Write a shell script that takes in three parameters: a search pattern, a glob file-path pattern and a file with a list of server hostnames. It #then searches for the search pattern (arg 1) in the paths specified (arg 2) on all servers specified in the file (arg 3). You can assume that ssh #keys are setup to provide password-less SSH access to all the listed servers
- while read SERVER
- do
- ssh "$SERVER" /bin/sh -s <<"EOF"
- find "$3 -name $2"
- EOF
- done < $4
Add Comment
Please, Sign In to add comment