single quote replacement

hi all,

i have a data in the file which of the formate :
100,102,103

and the required formate is
\'100\',\'102\',\'103

Idealy we need to replace , with \',\'

Regards
arkesh

sed "s/,/\\\',\\\'/g;s/^/\\\'/;s/$/\\\'/" infile
# echo "100,102,103" | sed "s/,/\\\',\\\'/g;s/^/\\\'/;s/$/\\\'/"
\'100\',\'102\',\'103\'
echo "100,102,103"|sed "s|,|\\\',\\\\'|g"
100\',\'102\',\'103

regards
ygemici