shellcheck fix after applying "more contacts" patch

master
Maarten van Gompel 4 years ago
parent a537bea76a
commit 178c746d85
  1. 6
      scripts/core/sxmo_contacts.sh

@ -5,7 +5,7 @@
# Wherein $LOGFILE is *sorted* tsv with three fields: date\tevt\tnumber # Wherein $LOGFILE is *sorted* tsv with three fields: date\tevt\tnumber
# #
# number should be a full phone number starting with + and the country number # number should be a full phone number starting with + and the country number
# #
# Prints in output format: "number: contact" # Prints in output format: "number: contact"
CONTACTSFILE="$XDG_CONFIG_HOME"/sxmo/contacts.tsv CONTACTSFILE="$XDG_CONFIG_HOME"/sxmo/contacts.tsv
@ -29,9 +29,9 @@ contacts() {
} }
all_contacts() { all_contacts() {
cat "$CONTACTSFILE" | awk -F'\t' '{ awk -F'\t' '{
if (substr($0,1,1) == "+") print $1 ": " $2 if (substr($0,1,1) == "+") print $1 ": " $2
}' | sort -f -k 2 }' "$CONTACTSFILE" | sort -f -k 2
} }
if [ "$1" = "--all" ]; then if [ "$1" = "--all" ]; then

Loading…
Cancel
Save