The problem I face is easier to explain with an example:
if given the offset position of letter "h" that is 6, return number 105
if given the offset position of letter "s" that is 57, return number 107
Here is the input text:
105 hello world
106 today is friday
107 tomorrow is saturday
I am using bash.
I found that using "expr substr" I can locate the character at the given offset, but don't know how to proceed from there using grep. I am happy with using other tools (sed - my preference- or awk ). If it has to be done with perl I am happy to go that way to but I do not have experience with that language.
The regular expression would be "^[0-9]* " that is a number followed by a space
Many thanks in advance for your help