i wrote a sample script which will split the string into multiple variable
#!/bin/bash
IN="One-XX-X-17.0.0"
IFS='-' read -a ADDR <<< "$IN"
for i in "${ADDR[@]}"; do
echo "${ADDR[i]}"
done
while IFS='.' read -a ADDR[3]; do
for i in "${ADDR[3]}"; do
process "$i"
done
like var11 = One, var12=XX, var13=X, major1=17, minor1=0, rel1=0
but while running this script every time getting error . Could someone tell me what wrong with my script