EA to check duplex setting for en0 and en1?

donmontalvo
Esteemed Contributor III

There doesn't seem to be a previous post or thread regarding EA for checking duplex of en0 and/or en1.

Of course I didn't scroll past the first results page, since we're waiting for JAMF to fix the search sort issue.

<wink><wink>

Anyone have an EA for displaying duplex setting on the ports?

TIA
Don

--
https://donmontalvo.com
1 REPLY 1

JRM
Contributor

this is messy, but it should get you started

#!/bin/bash
EN0_Result=`ifconfig en0 | grep media | sed 's/.*(//;s/).*//'`
EN1_Result=`ifconfig en1 | grep media | sed 's/.*(//;s/).*//'`

echo -ne "<result>en0: $EN0_Result
en1: $EN1_Result</result>"