Removing " from a readed registry value

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
 
M

Mark V

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.
 
B

bcg008

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top