permanent change in file

Hi!

i want to replace ; by ok in a file as below

test1(filename) containt:-

Hi i am kaushlesh; i am new to Unix.

i want permanent change in the file like below:-

Hi i am kaushlesh ok i am new to unix

How i will complite this..?

Dear Friend,

If you want to change the content in the file permanently , you can use "sed" command using the -i option.

If you use -i option it will affect the file also. But if we don't use the -i it will not affect the file content.

The new_file(file name) contain the following content
Hi i am kaushlesh; i am new to Unix.

 
sed -i 's/;/ ok/g'  new_file 

The output
Hi i am kaushlesh ok i am new to Unix