From 178c746d852a6f4926681d799ad5b8307c51b74f Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Sun, 1 Nov 2020 18:17:33 +0100 Subject: [PATCH] shellcheck fix after applying "more contacts" patch --- scripts/core/sxmo_contacts.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/core/sxmo_contacts.sh b/scripts/core/sxmo_contacts.sh index bdddc7a..e2c26d4 100755 --- a/scripts/core/sxmo_contacts.sh +++ b/scripts/core/sxmo_contacts.sh @@ -5,7 +5,7 @@ # Wherein $LOGFILE is *sorted* tsv with three fields: date\tevt\tnumber # # number should be a full phone number starting with + and the country number -# +# # Prints in output format: "number: contact" CONTACTSFILE="$XDG_CONFIG_HOME"/sxmo/contacts.tsv @@ -29,9 +29,9 @@ contacts() { } all_contacts() { - cat "$CONTACTSFILE" | awk -F'\t' '{ + awk -F'\t' '{ if (substr($0,1,1) == "+") print $1 ": " $2 - }' | sort -f -k 2 + }' "$CONTACTSFILE" | sort -f -k 2 } if [ "$1" = "--all" ]; then