summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsa Venton <asav1410@gmail.com>2019-10-21 21:29:47 +0100
committerAsa Venton <asav1410@gmail.com>2019-10-21 21:29:47 +0100
commit94d3170401337553cad267aabed4955bf2ddd2ba (patch)
tree1a24a80d826f05d75ed1cee245f285b3bf37d721
parent5040a82cde4be1daeea8cdf1830c4fcb12798224 (diff)
fix sed that was meant to remove trailing comma rather than first pipe
-rwxr-xr-xlivetimes.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/livetimes.sh b/livetimes.sh
index 2427dde..4b22639 100755
--- a/livetimes.sh
+++ b/livetimes.sh
@@ -24,7 +24,7 @@ _liveresult() {
else
for json in $(echo "${livetimes}" | jq -r '.[] | @base64'); do
if [[ $(_jq '.service_number') != $outroute ]]; then
- result=$(echo $result | sed 's/|//')
+ result=$(echo $result | sed 's/,$//')
result="$result | $(_jq '.destination')[$(_jq '.service_number')] - $(_jq '.eta'), "
elif [ $outroute = $outroute ]; then
result="$result $(_jq '.eta'), "