Getting as much system info possible.
Ken Ray
kray at sonsothunder.com
Fri Mar 18 20:06:23 EST 2005
On 3/18/05 4:09 PM, "Malte Brill" <revolution at derbrill.de> wrote:
> Thanks Todd, Robert and Xavier!
>
> I can´t try the windows version now.
>
> On Os X.2.6 I get the following error:
>
> put shell(system_profiler)
>
> /bin/sh: line 1: 545 Segmentation fault system_profiler
>
> How would I use grep Todd?
Malte, here's what I use to get the computer's name in OS X:
put shell("system_profiler SPSoftwareDataType") into tData
get matchText(tData,"(?s)Computer Name:\W*(.*?)\n",tName)
You need to pass a type of information you want to get back to
system_profiler (in this case "SPSoftwareDataType"). To get the different
data types do:
put shell("system_profiler -listDataTypes")
HTH,
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list