From c5f2df5c9304120eb740a188e1f533a54414e925 Mon Sep 17 00:00:00 2001 From: neil Date: Sun, 17 Apr 2016 19:16:48 +0800 Subject: [PATCH] fix compatible for sh. head -n -1 is not supported on pfsense. --- acme.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acme.sh b/acme.sh index 7d3b30c0..0453240d 100755 --- a/acme.sh +++ b/acme.sh @@ -194,7 +194,7 @@ _getfile() { _err "Can not find start line: $startline" return 1 fi - + i="$(_math $i + 1)" _debug i $i j="$(grep -n -- "$endline" $filename | cut -d : -f 1)" @@ -202,10 +202,10 @@ _getfile() { _err "Can not find end line: $endline" return 1 fi - + j="$(_math $j - 1)" _debug j $j - sed -n $i,${j}p "$filename" | head -n -1 | tail -n +2 + sed -n $i,${j}p "$filename" }