One of the methods
IFS=/ read -r -a LIST <<< "${AIRLINE_OPTION//-A /}"
This puts the output from parameter substitution ${AIRLINE_OPTION//-A /}in the "here-string" string and uses the built-in bash readto parse this array. Separation on /is achieved by setting the values IFSin /for the team read.
source
share