DEV Community

Query Filter
Query Filter

Posted on

syb2

LINE=$(echo "$RESULT" | tail -1)

# normalize: remove spaces around pipes
CLEAN_LINE=$(echo "$LINE" | sed 's/[[:space:]]*|[[:space:]]*/|/g' | sed 's/^|//;s/|$//')

IFS='|' read -r STATUS MAX_DT RECENT <<< "$CLEAN_LINE"

Enter fullscreen mode Exit fullscreen mode

Top comments (0)