All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scsh.netstat.sc Maven / Gradle / Ivy

There is a newer version: 0.5.0
Show newest version
/*
	@Begin
	Show network interface status
	
	Syntax
		netstat
	@End
 */

import java.net.NetworkInterface
import scala.collection.JavaConverters._

NetworkInterface.getNetworkInterfaces.asScala.foreach { ni =>
  println(s"  ${ni.getName} : ${ni.getDisplayName}")
  ni.getInetAddresses.asScala.foreach { ia =>
    println(s"        ${ia.getHostAddress}")
  }
  println("")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy