0
我努力做到以下几点:无法awk命令的输出存储到一个变量
#!/bin/bash
echo "Enter Receiver HostNames (comma separated hostname list of receivers):"
read receiverIpList
receiver1=`$receiverIpList|awk -F, '{print $1}'`
echo $receiver1
当我跑我得到以下错误的脚本
。
./test1.sh
Enter Receiver IP Addresses (comma separated IP list of receivers):
linux1,linux2
./test1.sh: line 6: linux1,linux2: command not found
有人能告诉我在脚本中出了什么问题吗?
这与PowerShell无关... – thepip3r
请看看:[我应该怎么做当有人回答我的问题?](http://stackoverflow.com/help/someone-answers) – Cyrus