Thank you very much. This explanation lights me up much better.
I had thought about it. I did a test while doing this:
read -r NUM ALIAS NAME URI < <(echo ${PARAM} | awk -F “|” ‘{print “\”“$1 “\”” “\”“$2 “\”” “\”“$3 “\”” “\”“$10 “\””}’)
But it didn’t help
I have solve my problem like this.
INDICE=0
while IFS="" read -r p || [ -n "$p" ] ; do
echo .
echo "CURRENT : $p"
echo .
((INDICE+=1))
printf '%d : %s\n' "$INDICE" "$p"
case "$INDICE" in
"1")
NUM="$p"
;;
"2")
ALIAS="$p"
;;
"3")
NAME="$p"
;;
"4")
URI="$p"
break
;;
esac
done < "$ZYPPER_OUTPUT_TO_USE"
But I would like to have a solution in one line .
If you have a direction that I can follow, I buy it.
Thank you for helping