From aabe661dbe1c79fc5d6b365ab866def1841c510b Mon Sep 17 00:00:00 2001 From: Chris Garland Date: Tue, 10 Oct 2017 12:06:28 +0800 Subject: [PATCH] updated commenting --- alpha_insert.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alpha_insert.sh b/alpha_insert.sh index 2169e5a..ed9be3a 100755 --- a/alpha_insert.sh +++ b/alpha_insert.sh @@ -3,7 +3,7 @@ temp_file="temp.sort" num_insertions=0 num_duplicates=0 -# Copy contents of second file into first file +# Append contents of new_file into main_file # ensuring no duplicates. while read p; do if [ $(grep -w $p $2 | wc -l) -eq 0 ]; then @@ -17,6 +17,7 @@ done < $1 echo "NUMBER OF INSERTIONS: $num_insertions" echo "NUMBER OF DUPLICATES: $num_duplicates" +# Sort main_file sort $2 > $temp_file cat $temp_file > $2 rm -f $temp_file