I am not sure if this is the right forum to ask this question. Still I thought I should try because I am desperately seeking a solution for this.
I want to search for a pattern in a single line of text and to identify the column position if this pattern is found in the text.
If the text is
THIS IS HELLO WORLD and I search for the pattern HELLO, I should get the output as 9 (Position of H assuming 'T' in THIS has a position 1)
I am working on Solaris - which means I have all the standard tools e.g. sed, awk, grep etc available. But I am not sure of the logic.
I would be greatful if anybody can help on this.
Many Thanks in advance,