From d31c0961407f590c77c5c1ec7bab5dcffacdfae8 Mon Sep 17 00:00:00 2001 From: Brodie Blackburn Date: Wed, 17 Jan 2018 09:30:08 +1000 Subject: [PATCH] Use grep basic rather than extended regular expressions --- acme.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/acme.sh b/acme.sh index 9d23ed0d..8e9265ef 100755 --- a/acme.sh +++ b/acme.sh @@ -50,8 +50,8 @@ NGINX="nginx:" NGINX_START="#ACME_NGINX_START" NGINX_END="#ACME_NGINX_END" -BEGIN_CSR="-----BEGIN( NEW)? CERTIFICATE REQUEST-----" -END_CSR="-----END( NEW)? CERTIFICATE REQUEST-----" +BEGIN_CSR="-----BEGIN\( NEW\)\? CERTIFICATE REQUEST-----" +END_CSR="-----END\( NEW\)\? CERTIFICATE REQUEST-----" BEGIN_CERT="-----BEGIN CERTIFICATE-----" END_CERT="-----END CERTIFICATE-----" @@ -798,7 +798,7 @@ _getfile() { return 1 fi - i="$(grep -n -E -- "$startline" "$filename" | cut -d : -f 1)" + i="$(grep -n -- "$startline" "$filename" | cut -d : -f 1)" if [ -z "$i" ]; then _err "Can not find start line: $startline" return 1 @@ -806,7 +806,7 @@ _getfile() { i="$(_math "$i" + 1)" _debug i "$i" - j="$(grep -n -E -- "$endline" "$filename" | cut -d : -f 1)" + j="$(grep -n -- "$endline" "$filename" | cut -d : -f 1)" if [ -z "$j" ]; then _err "Can not find end line: $endline" return 1