mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 02:29:58 +00:00
[BETA] Test grep regex changes to setup-ngxblocker
This commit is contained in:
parent
41c057b0fc
commit
10433fbf85
1 changed files with 2 additions and 3 deletions
|
@ -221,9 +221,8 @@ find_line() {
|
|||
# ignore file #comments
|
||||
#first) awk "/$find_str/{ print NR; exit }" $file;;
|
||||
#last) awk "/$find_str/{ print NR }" $file | tail -n1;;
|
||||
|
||||
first) grep -nE "^$[[:space:]]+find_str" $file | head -n1 | awk -F: '{print $1}';;
|
||||
last) grep -nE "^[[:space:]]+$find_str" $file | tail -n1 | awk -F: '{print $1}';;
|
||||
first) grep -nE "^[[:space:]]+find_str" $file | head -n1 | awk -F: '{print $1}';;
|
||||
last) grep -nE "[[:space:]]+$find_str" $file | tail -n1 | awk -F: '{print $1}';;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue