Command to parse a word character by character

Hi All,
Can anyone help me please,
I have a word like below.
6,76
I want to read this word and check if it has "," (comma) and if yes then i want to replace it with "." (dot). That means i want to be changed to 6.76
If the word doesnot contain "," then its should not be changed.

Eg.
6.74 ----> should be 6.74 only [ i mean no change required]
5,73 ----> should be 5.73 [change required has mentioned above]
777,9 ----> should be 777.9 [change required has mentioned above]
2000 -----> should be 2000 only [ i mean no change required]

Thanks in advance,
Giri

echo "6,76" | tr ',' '.'

Thanks a lot Anchal,it was perfect code to my requirment.

Thanks,
Giri

It can be done much faster without an external command:

var=12,34
while :
do
  case $var in
    *,*) var=${var%%,*}.${var#*,} ;;
    *) break ;;
  esac
done
echo "$var"

Question.

*,*) var=${var%%,*}.${var#*,} ;;

Why %% and #* ?
Please explain this line.

It's basic parameter expansion that remove portions of the variable's contents; see the relevant section in your shell's man page.

those are shell's string operations.
%% deletes the longest part whenever pattern matches at the end.
# deletes the shortest part whenever pattern matched at the beginning.

this is just a short explanation.
agree with that you need to look at the man pages for details.