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.
我想知道是否可以将来自不同来源的内容添加为单行。我用了粘贴,但没有用。
例如
x=1 paste echo hi awk NR=="'$x' file.txt echo bye
有任何想法吗?
谢谢
echo hi $(awk NR=="$x" file.txt) bye
或添加更多来源:
echo hi $(awk NR=="$x" file.txt) $(awk NR-1=="$x" file.txt) bye