I run a script with the param -A AA/BB . To get an array with AA and BB, i can do this.
INPUT_PARAM=(${AIRLINE_OPTION//-A / }) #get rid of the '-A ' in the begining
LIST=(${AIRLINES_PARAM//\// }) # split by '/'
Can we achieve this in a single line?
Thanks in advance.
${AIRLINE_OPTION#-A }to remove-Afrom the beginning, which is shorter and portable.AIRLINE_OPTION, and the other is returning a modification ofAIRLINES_PARAM, I suspect there's no way to do this in one command - they're two completely separate commands with separate inputs and separate outputs.