From b7f4dbe8d39084cdb423d985976ca1e40996e886 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 23 May 2020 19:48:49 -0500 Subject: Change awk to gawk --- bollux | 8 ++++---- 1 file 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 while read -d $'\r' -r head; do break # wait to read the first line done - code="$(awk '{print $1}' <<<"$head")" - meta="$(awk '{for(i=2;i<=NF;i++)printf "%s ",$i;printf "\n"}' <<<"$head")" + code="$(gawk '{print $1}' <<<"$head")" + meta="$(gawk '{for(i=2;i<=NF;i++)printf "%s ",$i;printf "\n"}' <<<"$head")" log 5 "[$code] $meta" @@ -290,7 +290,7 @@ display() { # display MIMETYPE < DOCUMENT case "$mimetype" in text/*) # normalize line endings to "\n" - # awk 'BEGIN{RS=""}{gsub(/\r\n?/,"\n");print}' + # gawk 'BEGIN{RS=""}{gsub(/\r\n?/,"\n");print}' cat # TODO: use less with linking and stuff # less -R -p'^=>' +g @@ -356,7 +356,7 @@ bollux_cleanup() { if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then set -euo pipefail # strict mode # requirements here -- so they're only checked once - require awk + require gawk require dd require mv require openssl -- cgit 1.4.1-21-gabe81