shell脚本解决方案

shell脚本我在一个shell脚本中写了下面两个语句:accountcut -d : -f1 /etc/passwd | sort‘echo $accou

shell脚本
我在一个shell脚本中写了下面两个语句:
account='cut -d ":" -f1 /etc/passwd | sort‘
echo $account
在ubuntu下执行该脚本,为啥输出的还是cut -d ":" -f1 /etc/passwd | sort,而没有执行单引号中的内嵌指令呢?
[解决办法]
account=`cut -d ":" -f1 /etc/passwd 
[解决办法]
 sort`

account=$(cut -d ":" -f1 /etc/passwd 
[解决办法]
 sort)
后种方式更好