Parsing output of "system_profiler" command

Jajati Sahu jajati_sahu at persistent.co.in
Thu Apr 3 23:29:31 PDT 2008


 

Hi,

 

In my perl file, I am using  "/usr/sbin/system_profiler -xml"  command to
get the system information. The output is stored in a variable say $output.

Now I want to parse $output and edit a nested value. Is there any specific
way to do this? 

 

And which type of string $output contains. Is it normal perl string or XML
string or what?

 

Thanks

Keshari

 



More information about the MacOSX-dev mailing list