I want to make an alias for randomly changing my mac address
alias chrandmac="sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')"
but the command substitution part is already resolved when executing the profile.
alias chrandmac='sudo ifconfig en0 ether 83:3a:bf:fc:4e:29'
Any thoughts as to why this occurs?