#!/bin/sh
if [ $# -ne 2 ]; then
echo "Usage:./incremental_copy.sh source_dir destination_dir"
exit 1
fi
source_dir=$1
destination_dir=$2
for file in $(1s $source_dir); do
if [ ! -f destination_dir/$file ]; then
cp $source_dir/$file $destination_dir
echo "copied $file to $destination_dir"
fi
done
echo "Incremental copy complete'