1

Adding a time stamp when moving a file in bash

view story
linux-howto

http://unix.stackexchange.com – #!/bin/bash while read server <&3; do #read server names into the while loop if [[ ! $server =~ [^[:space:]] ]] ; then #empty line exception continue fi echo "Connecting to - $server" #ssh "$server" #SSH login while read updatedfile <&3 && read oldfile <&4; do echo Comparing $updatedfile with $oldfile if diff "$updatedfile" "$oldfile" >/dev/null ; then echo The files compared are the same. No changes were made. else echo The files compared are different. # copy the new file and (HowTos)