我有一个文件名格式为 $date.txt 的目录。我想从中提取 5 个最新文件。有没有比这更优雅的解决方案
for f in 2*.txt; do echo $f; done | tail -5 | while read f; do cat $f; done
bash cat
bash ×1
cat ×1