wangzhiyong 2 жил өмнө
parent
commit
80112e3cb2
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      log.sh

+ 1 - 1
log.sh

@@ -25,7 +25,7 @@ do
     exit 1
     exit 1
   fi
   fi
   
   
-  matching_line=$(grep -n "$2" "$dir/$file" | tail -n 1)
+  matching_line=$( LC_ALL=C fgrep  -n "$2" "$dir/$file" | tail -n 1)
 
 
   if [ -z "$matching_line" ]; then
   if [ -z "$matching_line" ]; then
     echo "文件 $file 中没有找到字符串 '$2'"
     echo "文件 $file 中没有找到字符串 '$2'"