MAC vendor lookup: Difference between revisions

→‎{{header|PowerShell}}: Add implementation.
(→‎{{header|UNIX Shell}}: Corrected quotes and added formatting. One-liners can be powerful, but not every shell script needs to be one. :) Added works-with tags and a pure-POSIX version.)
(→‎{{header|PowerShell}}: Add implementation.)
Line 904:
"Apple, Inc."
(maclookup "D4:F4:6F:C9:EF:8D") )</lang>
 
=={{header|PowerShell}}==
{{trans|AppleScript}}
<lang powershell>#!/usr/bin/env pwsh
$apiRoot = "http://api.macvendors.com"
$macAddresses = @("88:53:2E:67:07:BE", "D4:F4:6F:C9:EF:8D",
"FC:FB:FB:01:FA:21", "4c:72:b9:56:fe:bc",
"00-14-22-01-23-45")
 
$macAddresses | % {
(Invoke-WebRequest "$apiRoot/$_").Content
Start-Sleep 1.5
}</lang>
 
{{Out}}
<pre>Intel Corporate
Apple, Inc.
Cisco Systems, Inc
PEGATRON CORPORATION
Dell Inc.</pre>
 
=={{header|Python}}==
1,479

edits