test: Avoid using 'head'

This commit is contained in:
Ethan P 2020-04-27 01:22:22 -07:00
parent 7fa1faf7bf
commit e79e747e71
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA
4 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ test:version() {
snapshot stdout snapshot stdout
snapshot stderr snapshot stderr
batgrep --version | head -n1 | cut -d' ' -f1 batgrep --version | awk 'FNR <= 1 { print $1 }'
batgrep --version | awk 'p{print} /^$/ { p=1 }' batgrep --version | awk 'p{print} /^$/ { p=1 }'
} }

View File

@ -7,6 +7,6 @@ test:version() {
snapshot stdout snapshot stdout
snapshot stderr snapshot stderr
batman --version | head -n1 | cut -d' ' -f1 batman --version | awk 'FNR <= 1 { print $1 }'
batman --version | awk 'p{print} /^$/ { p=1 }' batman --version | awk 'p{print} /^$/ { p=1 }'
} }

View File

@ -7,6 +7,6 @@ test:version() {
snapshot stdout snapshot stdout
snapshot stderr snapshot stderr
batwatch --version | head -n1 | cut -d' ' -f1 batwatch --version | awk 'FNR <= 1 { print $1 }'
batwatch --version | awk 'p{print} /^$/ { p=1 }' batwatch --version | awk 'p{print} /^$/ { p=1 }'
} }

View File

@ -7,6 +7,6 @@ test:version() {
snapshot stdout snapshot stdout
snapshot stderr snapshot stderr
prettybat --version | head -n1 | cut -d' ' -f1 prettybat --version | awk 'FNR <= 1 { print $1 }'
prettybat --version | awk 'p{print} /^$/ { p=1 }' prettybat --version | awk 'p{print} /^$/ { p=1 }'
} }