Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的代码是 bash 脚本:
for string in $LIST do echo "$string" >> file grep -v "#" file1 >> file done
“file1”仅包含一个值,并且该值会迭代更改。
我在“文件”中得到的结果是:
a 1 b 2 c 3
但是,我想要这个:
提前致谢。
for string in $LIST do echo "$string" $(grep -v "#" file1) done > file