I've been poking around Arch Linux's network scripts, and I can't seem to figure these lines out:
Code:
[ "$(/sbin/ifconfig ${1} 2>/dev/null | /bin/grep -v 'inet6 addr: fe80:' | /bin/grep -e 'inet addr:' -e 'inet6 addr')" ] && return 0
(these lines are to find out if an interface is up. The return exits the function that would bring the interface up if the interface were running)
I know what everything does execpt $(/sbin/ifconfig ${1} 2>/dev/null)
why is this in $() and that inside []?
these parentheses with a dollar sign in front is confusing me.