Re: diskutil_info handler (Was: UUID)
Re: diskutil_info handler (Was: UUID)
- Subject: Re: diskutil_info handler (Was: UUID)
- From: Skeeve <email@hidden>
- Date: Thu, 31 Jan 2008 22:43:03 +0100
Mark J. Reed wrote:
Handy. I would have done it with -plist, I think, rather than trying to
parse the output of the non-plist form...
if only diskutil knows about it. See my other message in regards to that.
That can be simplified to two regex matches instead of four:
Thanks for that.
but to nitpick
while (<>) {
if (/^\\s*(\\w[^:]+?)\\s*:\\s*(.*?)\\s*$/)
{
$info{$last_key=$1} = $2;
next;
}
elseif ($last_key && /\S/)
{
chomp( $info{$last_key} .= qq(\\n) . $_ );
}
}
it's not "elseif" but "elsif" and, because there is a "next" in the
if-block, a simple "if" will do too.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden