how to find a character position in a word/line?
Unix forum is the best site.
now in above line i want to find the character 'x' position
this is what i came up with:
$ echo "Unix forum is the best site." | grep -o "[-_a-zA-Z0-9\.]" | grep -n xupdate:
one of the users has a very simple solution:
$ expr index "Unix forum is the best site." x