#!/bin/bash
#
## Variables
NIC=`ifconfig | cut -d " " -f1`
##
echo -e "Carte\t\tAdresse\t\t\tMasque\n"
for i in $NIC; do
	IP=`ifconfig $i | grep adr | cut -d ":" -f2 | cut -d " " -f1 | head -n 1`
	MASK=`ifconfig $i | grep adr | cut -d ":" -f4 | cut -d " " -f1 | head -n 1`
	echo -e "$i\t\t$IP\t\t$MASK"
done
