1
0
Fork 0

readwwwlog: Start at line 1 if pattern is not found

This commit is contained in:
tastytea 2022-04-23 15:41:24 +02:00
parent a73f29871c
commit a5b424073c
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ for url in ${urls}; do
local file="$(mktemp --suffix='.readwwwlog')"
curl --silent --location --output ${file} ${url}
local -a cmd=(less --LINE-NUMBERS --ignore-case \
local -a cmd=(less +1 --LINE-NUMBERS --ignore-case \
--pattern='(error|fail):' ${file})
if [[ -o NO_INTERACTIVE ]]; then
cmd=(${TERMINAL} ${termopts} -e ${cmd})