我有下面这样的脚本:testing.sh
#!/bin/bash
while read inputline
do
plugin="$(echo $inputline | cut -d, -f 3-)"
echo \"$plugin\" > test1.out
done < $1
exit 0
配置文件:test.conf
host1-192.168.31.200,Current_Users,check_users -w 20 -c 50
执行脚本后:
#./testing.sh test.conf
输出文件:test1.out
"check_users -w 20 -c 50^M"
如何预防/避免^M
?