From: Silvio Rhatto Date: Sat, 27 Jul 2024 19:33:55 +0000 (-0300) Subject: Fix: collector: use '~' instead of full home folder pathname X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=9e2ce95bc99977bf47c9cfbe3489440cdd3418d7;p=scripts.git Fix: collector: use '~' instead of full home folder pathname --- diff --git a/collector b/collector index 5967e52..570d13c 100755 --- a/collector +++ b/collector @@ -30,7 +30,9 @@ elif [ "$ACTION" == "add" ]; then echo "* $*" >> "$COLLECTOR_FILE" elif [ "$ACTION" == "list" ]; then if grep -q -e "^ *\* " "$COLLECTOR_FILE"; then - echo "Collected items at $COLLECTOR_FILE:" + COLLECTOR_NAME="`echo $COLLECTOR_FILE | sed -e "s|$HOME|~|"`" + + echo "Collected items at $COLLECTOR_NAME:" echo "" grep -e "^ *\* " "$COLLECTOR_FILE" echo ""