For locating the first position of a character in a string we can use expr command.

For locating the first position of a character in a string we can use expr command. Correct Answer True

expr command can also locate the first occurrence of character inside a string. For example, to locate the position of character d in the string ‘abdullah’, we have to count the number of characters which are not ‘d’ (*), $ str=abdullah ; expr “$str” : ‘*d’ 3

Related Questions