Quote:
Originally Posted by fpmurphy
There are many ways of doing what you want. Here is an example of one way
Code:
#!/usr/local/bin/bash
ifconfig eth0 > ifconfig.out
hwaddr=$(grep "HWaddr" ifconfig.out | cut -d " " -f 5)
if [ $hwaddr = "00:0B:CD:85:A5:8A" ]
then
echo "match"
fi
|
Thank you for the answer, fpmurphy.
Could i know the other ways, please ? since i am avoiding writing the result into a file.
Then, what does "cut -d "" -f 5" mean ?
