Skip to content

Instantly share code, notes, and snippets.

@chris-erickson
Created July 31, 2016 18:21
Show Gist options
  • Save chris-erickson/937d3292a98ef4c5ce831792f9b8915d to your computer and use it in GitHub Desktop.
Save chris-erickson/937d3292a98ef4c5ce831792f9b8915d to your computer and use it in GitHub Desktop.
This just prints the ethernet link status to the console every 1 second
#! /bin/bash
while :
do
# Update the interface as needed
ifconfig en9 | grep media | tr -d '\t'
# Update the delay as needed (seconds)
sleep 1
done
# Prints something like: media: autoselect (1000baseT <full-duplex,flow-control>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment