koumdros / bash-Parafernalia

Bash scripts I use to help managing linux servers ( primarily CENTOs but also a few Debian ones)
GNU General Public License v2.0
0 stars 0 forks source link

problematic in systems with older versions of grep that do not support the --no-group-separator argument #1

Open koumdros opened 10 years ago

koumdros commented 10 years ago

I met this problem when workign iin some very old Centos 5 Installations and also XenServer...

koumdros commented 10 years ago

possible solution:

(echo "DEVICE MAC-ADDRESS IP-ADDRESS" && ifconfig | grep 'inet addr:' -B 1 | grep -v -- "^--$" | sed 'N;s/\n/ /' | egrep -v Loopback | tr -s ' ' | cut -d' ' -f1,5,7 | sed 's/addr://g') | column -t