mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 09:48:34 -04:00
Merge branch '3630-nextpart-is-not-compatible-with-set-x-v9_18' into 'v9_18'
Resolve "'nextpart' is not compatible with 'set -x'" [v9_18] See merge request isc-projects/bind9!7060
This commit is contained in:
commit
59cb6fa575
1 changed files with 4 additions and 4 deletions
|
|
@ -479,25 +479,25 @@ nextpartreset() {
|
|||
|
||||
# nextpartread: read everything that's been appended to a file since the
|
||||
# last time nextpart() was called and print it to stdout, print the
|
||||
# total number of lines read from that file so far to stderr
|
||||
# total number of lines read from that file so far to file descriptor 3
|
||||
nextpartread() {
|
||||
[ -f $1.prev ] || nextpartreset $1
|
||||
prev=`cat $1.prev`
|
||||
awk "NR > $prev "'{ print }
|
||||
END { print NR > "/dev/stderr" }' $1
|
||||
END { print NR > "/dev/stderr" }' $1 2>&3
|
||||
}
|
||||
|
||||
# nextpart: read everything that's been appended to a file since the
|
||||
# last time nextpart() was called
|
||||
nextpart() {
|
||||
nextpartread $1 2> $1.prev.tmp
|
||||
nextpartread $1 3> $1.prev.tmp
|
||||
mv $1.prev.tmp $1.prev
|
||||
}
|
||||
|
||||
# nextpartpeek: read everything that's been appended to a file since the
|
||||
# last time nextpart() was called
|
||||
nextpartpeek() {
|
||||
nextpartread $1 2> /dev/null
|
||||
nextpartread $1 3> /dev/null
|
||||
}
|
||||
|
||||
# _search_log: look for message $1 in file $2 with nextpart().
|
||||
|
|
|
|||
Loading…
Reference in a new issue