我期待创造一个bash脚本打印出一些额外的变量的文本文件,请参见下面打印文件出在bash
我想有这样的一个文本文件,它
bot1
bot2
bot3
,然后有一个bash脚本把它打印出来,像这样
--exclude-agent="bot1" --exclude-agent="bot2" --exclude-agent="bot3"
这可能吗?所以,如果我添加另一行到第一个文件,它将只打印另一个--exclude-agent =“我在文件中放入的任何文件”
目前我已经得到了下面的结果,但没有相当我想要的
#!/bin/bash
while read line
do
echo "--exclude-agent="$line" \\"
done < bots.txt
任何帮助将是伟大的!
http://mywiki.wooledge.org/XyProblem –