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.
我需要连接文件并打印它。但是,我还想在连接时添加一个标题(文件名),以区分文件。
例子:
file1.txt content of file1.txt file2.txt content of file2.txt .... ....
有什么方法可以解决这个问题?我正在使用 lp 命令进行打印。
for i in file?.txt ; do echo $i ; cat $i ; done | lp