diff options
author | Case Duckworth | 2020-05-23 19:48:49 -0500 |
---|---|---|
committer | Case Duckworth | 2020-05-23 19:48:49 -0500 |
commit | b7f4dbe8d39084cdb423d985976ca1e40996e886 (patch) | |
tree | 2a386af05d53f23ff180ae0d4b7c21d4864efbee | |
parent | Read statusline until \r (diff) | |
download | bollux-b7f4dbe8d39084cdb423d985976ca1e40996e886.tar.gz bollux-b7f4dbe8d39084cdb423d985976ca1e40996e886.zip |
Change awk to gawk
-rwxr-xr-x | bollux | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bollux b/bollux index ab9e76b..29bda1e 100755 --- a/bollux +++ b/bollux | |||
@@ -212,8 +212,8 @@ handle() { # handle URL < RESPONSE | |||
212 | while read -d $'\r' -r head; do | 212 | while read -d $'\r' -r head; do |
213 | break # wait to read the first line | 213 | break # wait to read the first line |
214 | done | 214 | done |
215 | code="$(awk '{print $1}' <<<"$head")" | 215 | code="$(gawk '{print $1}' <<<"$head")" |
216 | meta="$(awk '{for(i=2;i<=NF;i++)printf "%s ",$i;printf "\n"}' <<<"$head")" | 216 | meta="$(gawk '{for(i=2;i<=NF;i++)printf "%s ",$i;printf "\n"}' <<<"$head")" |
217 | 217 | ||
218 | log 5 "[$code] $meta" | 218 | log 5 "[$code] $meta" |
219 | 219 | ||
@@ -290,7 +290,7 @@ display() { # display MIMETYPE < DOCUMENT | |||
290 | case "$mimetype" in | 290 | case "$mimetype" in |
291 | text/*) | 291 | text/*) |
292 | # normalize line endings to "\n" | 292 | # normalize line endings to "\n" |
293 | # awk 'BEGIN{RS=""}{gsub(/\r\n?/,"\n");print}' | 293 | # gawk 'BEGIN{RS=""}{gsub(/\r\n?/,"\n");print}' |
294 | cat | 294 | cat |
295 | # TODO: use less with linking and stuff | 295 | # TODO: use less with linking and stuff |
296 | # less -R -p'^=>' +g | 296 | # less -R -p'^=>' +g |
@@ -356,7 +356,7 @@ bollux_cleanup() { | |||
356 | if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then | 356 | if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then |
357 | set -euo pipefail # strict mode | 357 | set -euo pipefail # strict mode |
358 | # requirements here -- so they're only checked once | 358 | # requirements here -- so they're only checked once |
359 | require awk | 359 | require gawk |
360 | require dd | 360 | require dd |
361 | require mv | 361 | require mv |
362 | require openssl | 362 | require openssl |