When i parse command line arguments with equal to as delimiter which can have nested equal to. CC="arm-oe-linux --sysroots=/home/somelocation" CFLAGS="" I had tried this:
for ARGUMENT in "$@"
do
KEY=$(echo $ARGUMENT | cut -f1 -d=)
VALUE=$(echo $ARGUMENT | cut -f2 -d=)
echo $KEY
echo $VALUE
echo "*******************"
case "$KEY" in
CC) CC=${VALUE} ;;
CFLAGS) CFLAGS=${VALUE} ;;
*)
esac
done
That But for nested = this does not help. Any suggestions?