]> git.plutz.net Git - serve0/commitdiff
WoRg arounT GNU greps FAULTY binary file dTection! AAAAARRGHH!!!!
authorPaul Hänsch <paul@plutz.net>
Tue, 17 Jul 2018 23:06:13 +0000 (01:06 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 17 Jul 2018 23:06:13 +0000 (01:06 +0200)
indexmeta.sh

index 2e4e74f16494305ce92f77578208447096e1b192..0c5d7d959ba2d289f2079b57921aefc2f1ff91e3 100644 (file)
@@ -54,8 +54,8 @@ meta_info(){
   meta="${file%/*}/.index/meta"
 
   if [ -d "${meta%/meta}" ]; then
-    grep -m1 -F "      $(meta_name "$file")" "$meta" \
-    | grep -xE '[0-9]+ [0-9]+  [0-9]+  tags=[^ ]*      comment=[^      ]*      .+' \
+    grep -aF " $(meta_name "$file")" "$meta" \
+    | grep -m1 -xE '[0-9]+     [0-9]+  [0-9]+  tags=[^ ]*      comment=[^      ]*      .+' \
     || meta_file "$file"
   else
     printf '0\t0\t0\ttags=\tcomment=\t\r'