Let us consider a file with the following contents:
$ cat file Unix,10,A Linux,30,B Solaris,40,C HPUX,20,D Ubuntu,50,E
$ cat file Unix,10,A Linux,30,B Solaris,40,C HPUX,20,D Ubuntu,50,E
getopts optstring name-> optstring - the string which contains the list of options expected in the command line
${variable:offset:length}
where variable is the variable containing the string,$ x="Solaris"
$ cat file Unix Linux Solaris AIX Linux