Advertisement

08.08.2008 at 08:16AM PDT, ID: 23632983 | Points: 125
[x]
Attachment Details

How do I search a text file for a string that has a hex value that follows it and then convert that hex value to decimal?

Asked by NSISoftware in MSH/Monad PowerShell

Tags: , , ,

I am attempting to use Powershell to search a text file that contains output of registry REG_DWORD values that are in HEX.  I can find the values, now I just need to convert those values to decimal and pipe them to a new file.

The pattern is 'REG_WORD  xxxxxxxx' where xxxxxxxx is the hex value.  The catch is, the hex value does not include preceding zeros.  So, for example, the value may be hex 451 which is 1105 in decimal.

Haven't posted in awhile, so if more info is needed, I can provide.  Thanks in advance for the help.  This will be part of a powershell script, but is not dependent on the rest of the script.Start Free Trial
 
Loading Advertisement...
 
[+][-]08.08.2008 at 02:29PM PDT, ID: 22193771

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.08.2008 at 02:31PM PDT, ID: 22193776

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.14.2008 at 11:44AM PDT, ID: 22233014

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628