Skip to content

Commit

Permalink
fix: adding line break between multiple requests (#28)
Browse files Browse the repository at this point in the history
`list-all` command was not returning the lines correctly
(see issue #27 - #27)
  • Loading branch information
rafaelgallani authored Feb 3, 2021
1 parent e2993f4 commit e148004
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/list-all
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ function list_all() {
more=false
fi
additions=$(echo "${res}" | grep -Eo "name.*google-cloud-sdk-[0-9]+\.[0-9]+\.[0-9]+-(linux)-x86_64" | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+")
list="${list}${additions}"
if [[ -n "${additions}" ]]; then
list="${list}\n${additions}"
fi
done
echo "${list}"
echo -e "${list}"
}

list_all | sort -V | tr '\n' ' '

0 comments on commit e148004

Please sign in to comment.