我试图使用find -exec与多个命令没有任何成功.有人知道以下命令是否可行?
find *.txt -exec echo "$(tail -1 '{}'),$(ls '{}')" \;
基本上,我试图在当前目录中打印每个txt文件的最后一行,并在行的末尾打印,后跟文件名的逗号.
bash find
bash ×1
find ×1