I am a newbie in SHell Programming.
I want to ask something about referring the result of the previous command in Shell-Prog.
For example :
bnm@dsds~> ifconfig
eth0 Link encap:Ethernet HWaddr 00:0B:CD:85:A5:8A
inet addr:192.168.0.2 Bcast:192.168.0.225 Mask 255.255.255.0
bnm@dsds~> next command ???
My question is : What should i type as the next command ??? using
the if-statement below :
--------------
if [ HWaddr is equal to 00:0B:CD:85:A5 ]; then
.....
fi
--------------
so that it will refer to the HWaddr 00:0B:CD:85:A5 printed
as the result of the previous command ?
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 ?