Find the position of a string and replace with another string

Hi,

I have a file named "Test_2008_01_21"
The file contains a string "manual" that occurs many times in the file
How can i find the positions of the string "manual" in the file

Ex: if the string " manual " occurs three times in the file. i want to replace the second occurance of string the " manual " with another string "annual".

How it can be done?

Some help please
Regards
bab123

echo "leoisleoisleo" | sed 's/leo/LEO/2'

Thanks for the reply
If know thw number of occurances of string I can replace the string
BUt if i want to know how many times the string appears?
What are the positions of string appearances?
Please suggest me

regards
bab123

echo "leoisleoisleo" | grep -on leo
echo "leoisleoisleo" | grep -on leo | cut -d: -f1
 echo "leoisleoisleo" | grep -on leo | wc -l
 

Assuming there is only one instance of "manual" one a line:

awk '
       {x += sub( "manual", "manual" )}
x == 2 {x += sub( "manual", "annual" ) }
       { print }' Test_2008_01_21

I am getting the following error

grep: illegal option -- o
Usage: grep -hblcnsviw pattern file . . .

The -o option to grep is not standard.

But there is no way to do what you want just using grep; it cannot replace anything.