+
+
+
+#hmmm: need error checking here!!!!
+
+
+
+
+
+if [[ $dir1 == *":"* ]]; then
+ # host processing on first dir.
+ host1=${dir1%:*}
+ dir1=${dir1#*:}
+echo "got host1 as $host1"
+echo "got new dir1 as $dir1"
+fi
+if [[ $dir2 == *":"* ]]; then
+ # host processing on second dir.
+ host2=${dir2%:*}
+ dir2=${dir2#*:}
+echo "got host2 as $host2"
+echo "got new dir2 as $dir2"
+fi
+if [ -z "$host1" ]; then
+ # fully local compare location for first dir.
+ pushd "$dir1" &>/dev/null
+ find . >"$out1"
+ popd &>/dev/null
+else
+ # remote compare location for first dir.
+ ssh "$host1" "cd \"$dir1\" && find ." >"$out1"
+fi
+# sort the output from that find.