organzing for portfolio

This commit is contained in:
2024-12-13 17:32:49 -06:00
parent 299f95e2fb
commit 1b0612b005
30 changed files with 910 additions and 0 deletions

View File

@ -0,0 +1,17 @@
function obtain_centos_mac()
{
DISTRO_TYPE="$(distro |awk '{print $1}'|tr '[:upper:]' '[:lower:]')"
DISTRO_VERSION=$(distro |awk '{print $2}'|awk -F '.' '{print $1}')
if [ $DISTRO_TYPE == "centos" ] && [ $DISTRO_VERSION == 6 ] ;
then
/sbin/ifconfig eth0|grep HWadd| awk '{print $NF}'|tr '[:upper:]' '[:lower:]'|sed 's/\:/-'/g
fi
if [ $DISTRO_TYPE == "centos" ] && [ $DISTRO_VERSION == 7 ] ;
then
/sbin/ifconfig eth0|grep ether| awk '{print $2}'|tr '[:upper:]' '[:lower:]'|sed 's/\:/-'/g
fi
}