Search Results

Search: Posts Made By: radoulov
2,590
Posted By radoulov
Assuming the server list is a file in the...
Assuming the server list is a file in the following format:

server1
server2
...You could use something like this:

_slist=<your_filename>

while IFS= read -r; do
ssh "$REPLY" "$_cmd" ||
...
2,590
Posted By radoulov
Yes, thanks! Actually, more quotes are needed: ...
Yes, thanks!
Actually, more quotes are needed:

_cmd="[ -f '$_fn' ] && /usr/bin/md5sum '$_fn'"


for s in "${_server_list[@]}"; do
ssh "$s" "$_cmd" ||
printf >&2 "error executing...
2,590
Posted By radoulov
#!/bin/bash (( $# < 1 )) && { printf...
#!/bin/bash

(( $# < 1 )) && {
printf "usage: %s <file_name>\n" "${0##*/}"
exit 1
}

_server_list=(
server1
server2
)

_fn=$1

_cmd=/usr/bin/md5sum

for s in...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 04:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy