mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-16 10:09:48 +00:00
PATCH: Revert to Previous Install, Setup and Update Scripts
This commit is contained in:
parent
6811adf45e
commit
5956814094
4 changed files with 68 additions and 20 deletions
|
@ -186,9 +186,8 @@ find_line() {
|
|||
local file=$1 find_str=$2 first_last=$3
|
||||
|
||||
case "$first_last" in
|
||||
# ignore file #comments
|
||||
first) grep -nE "^[ ]+$find_str" $file | head -n1 | awk -F: '{print $1}'
|
||||
last) grep -nE "^[ ]+$find_str" $file | tail -n1 | awk -F: '{print $1}'
|
||||
first) awk "/$find_str/{ print NR; exit }" $file;;
|
||||
last) awk "/$find_str/{ print NR }" $file | tail -n1;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue