fixed gojq null return
This commit is contained in:
parent
7eaba6b162
commit
62a2e6be80
@ -181,7 +181,7 @@ print_status() {
|
|||||||
id=$(printf '"%d"' $STATION_ID)
|
id=$(printf '"%d"' $STATION_ID)
|
||||||
ALIAS=$(cat "$ALIASES_FILE" | gojq ".$id" | tr -d '"')
|
ALIAS=$(cat "$ALIASES_FILE" | gojq ".$id" | tr -d '"')
|
||||||
|
|
||||||
if [[ ! -z "$ALIAS" ]] ; then
|
if [[ "$ALIAS" != "null" ]] ; then
|
||||||
# if there is an alias
|
# if there is an alias
|
||||||
STATION_NAME="$ALIAS"
|
STATION_NAME="$ALIAS"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user