wangzhiyong %!s(int64=2) %!d(string=hai) anos
pai
achega
9aa1a5f271
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      logr.sh

+ 2 - 2
logr.sh

@@ -15,9 +15,9 @@ fi
 while [ $count -lt 20 ]
 do
   if [ -z "$3" ]; then
-    file=$(ls -t "$dir" | grep "error" | head -n $((count + 1)) | head -n 1)
+    file=$(ls -t "$dir" | grep "error" | head -n $((count + 1)) | head -n $((count + 1)) )
   else
-    file=$(ls -t "$dir" | grep -v "$3" | head -n $((count + 1)) | head -n 1 )
+    file=$(ls -t "$dir" | grep -v "$3" | head -n $((count + 1)) | head -n $((count + 1)) )
   fi
   
   if [ -z "$file" ]; then