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