Issue
Code backup
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#! /bin/sh
|
||||
|
||||
HOSTNAME=$(hostname)
|
||||
IP=$(hostname -I)
|
||||
MAC=$(cat /sys/class/net/eth0/address)
|
||||
|
||||
echo "Device Information:" > file.txt
|
||||
echo ">HOST:" >> file.txt
|
||||
echo " $HOSTNAME" >> file.txt
|
||||
echo ">IP:" >> file.txt
|
||||
echo " $IP" >> file.txt
|
||||
echo ">MAC:" >> file.txt
|
||||
echo " $MAC" >> file.txt
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user