I'm working currently in a shell script to monitor a Solaris system. The main purpose of the script is show info like: Memory, Network, etc.

In the Network part, it will show info like arp table, available network interfaces, etc.

The thing is, the script is not only for a one system, so, the others have different nics. For example: for one of them I have the **net1**, and in an other I have **bge0**. I need to create a function to evaluate if the interface is net1 shows the result of this comand:

```
ifconfig -a | grep [network interface name]

```

The script will evaluate things like: if the OS is Solaris 10 then, show the nic available and ip that it use, in case that the OS will be a Solaris 11 then, show [other part....]

I hope to be very clear explaining this.

I used **`ifconfig`** command instead `ipadm` because I have Solaris 10 and Solaris 11 systems actually.