echo \"Enter the item separated by colons\" read col i=1 while [ 1 ] do s=\`echo $col | cut -d \":\" -f $i\` if [ ! $s ] then exit else echo $s i=\`expr $i + 1\` fi done OUTPUT *********** [04MCA58@LINTEL 04MCA58]$ sh colon.sh Enter the item separated by colons abc:xyfds:sdfjek abc xyfds sdfjek