Removing " from a readed registry value

  • Thread starter Thread starter bcg008
  • Start date Start date
B

bcg008

Hi,
I'm using regedit /e in order to read registry.
For string values, I get the text inside commas, for example:
"LocalDir"="\\c:\\temp\\".
I need to strip the commas (thus LocalDir=\\c:\\temp\\).
Until recently I've used the sed utility:
sed s/'"'//g which did the required task, but moving to sed version
v4.0.7 (because of 64-bit compliant) this resolve an error:

sed: -e expression #1, char 9: Unknown option to `s'

Can someone suggest what other option can I use?


Thanks
 
In said:
Hi,
I'm using regedit /e in order to read registry.
For string values, I get the text inside commas, for example:

I suspect you mean to say "inside double-quotation marks".
"LocalDir"="\\c:\\temp\\".
I need to strip the commas (thus LocalDir=\\c:\\temp\\).
Until recently I've used the sed utility:
sed s/'"'//g which did the required task, but moving to sed version
v4.0.7 (because of 64-bit compliant) this resolve an error:

sed: -e expression #1, char 9: Unknown option to `s'

Can someone suggest what other option can I use?

For SED (not a registry topic) try group
microsoft.public.win2000.cmdprompt.admin

Depending on your needs it may be useful to use
REG.EXE query [args]
to get output in a different and possibly more useful format.
 
Thanks a lot Mark.
I was not familiar at all with the REG.EXE. It's just the tool I need
and I'll use it.

Thanks
Mark said:
In said:
Hi,
I'm using regedit /e in order to read registry.
For string values, I get the text inside commas, for example:

I suspect you mean to say "inside double-quotation marks".
"LocalDir"="\\c:\\temp\\".
I need to strip the commas (thus LocalDir=\\c:\\temp\\).
Until recently I've used the sed utility:
sed s/'"'//g which did the required task, but moving to sed version
v4.0.7 (because of 64-bit compliant) this resolve an error:

sed: -e expression #1, char 9: Unknown option to `s'

Can someone suggest what other option can I use?

For SED (not a registry topic) try group
microsoft.public.win2000.cmdprompt.admin

Depending on your needs it may be useful to use
REG.EXE query [args]
to get output in a different and possibly more useful format.
 
Back
Top