diff --git a/find.sh b/find.sh index 53a83d4..6f2f384 100755 --- a/find.sh +++ b/find.sh @@ -1,10 +1,9 @@ #!/bin/bash -results=$(find . -name '*_1.txt') +results=$(find . -name '*_1.*') for result in $results;do originFile=$(echo $result | sed 's/\(.*\)_1\(\..*\)/\1\2/g') if [ -f $originFile ];then - echo "$originFile exist!" same=$(diff $result $originFile) if [ ! -n "$same" ];then echo "file $result same with $originFile"