What is the difference in collect a command output in Shell script using `command` and $(command)? For example:
# IP1=$(ifconfig eth0 | grep -e "inet " | cut -d: -f2 | awk '{print $1}')
# IP2=`ifconfig eth0 | grep -e "inet " | cut -d: -f2 | awk '{print $1}'`
# echo $IP1 $IP2
> 192.241.145.112 192.241.145.112
|awk -F: '/inet/{print $2}'
– Bernhard Dec 07 '13 at 18:32