I can execute this command perfectly, with the output I want:
ifconfig eth0 | grep HWaddr | awk '{print $5}'
However, when I set the variable command and print the variable, I get an error message:
CASS_INTERNAL=`ifconfig eth0 | grep HWaddr | awk '{print \$5}'`
$CASS_INTERNAL
my internal xxx ip: command not found
The strange thing is - my internal IP really appears. How can I do without mistakes? It doesn't matter, but I'm using the latest version of Ubuntu.
user375566
source
share