shell 笔记3

iptemp=`ifconfig  | grep Bcast | awk {'print $2'} | awk -F: {'print $2'}`

# echo $iptemp
10.1.1.1

将执行shell命令的结果赋予变量

你可能感兴趣的:(shell)