wangzhiyong 2 年 前
コミット
80112e3cb2
1 ファイル変更1 行追加1 行削除
  1. 1 1
      log.sh

+ 1 - 1
log.sh

@@ -25,7 +25,7 @@ do
     exit 1
   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
     echo "文件 $file 中没有找到字符串 '$2'"