Passing help options to a bash script
There is a break statement at the end of the while true.
Like this, the while loop is completely pointless, you can remove it.

The output variable is never used.
Either you forgot to include the rest of the script,
or this is a pointless statement and should be removed.

The line that sets the output variable to the result of $(curl ...) is extremely long, and hard to read. It would be better to add some line breaks to reduce horizontal scrolling to read the code.
The grep-grep-head-sed chain can be shorter too with a little Awk magic.

This long condition would be simpler to write with a case:


if [ "$1" != "-l" ] &amp;&amp; [ "$1" != "-a" ] &amp;&amp; [ "$1" != "-h" ] &amp;&amp; [ "$1" != "" ]; then
    output=$(curl ...)
fi



Like this:

case "$1" in
    -l|-a|-h|"") ;;
    *)
        output=$(curl ...)
        ;;
esac