【发布时间】:2018-09-21 21:28:38
【问题描述】:
我有这个脚本,
find -iname \*.${EXT} -print0 | xargs -0 ls -l --time-style="+%b %Y" | awk '{print $NF,$3,$5,$6,$7}' OFS="\t" > ${EXT}.txt
awk -vextension="${EXT}" -vfiletype="${TYPE}" -vcompress="${COMP}" -vOFS="\t" '{print $0, ext, filetype, compress}' < ${EXT}.txt >> all.txt
我想更改脚本以自动将运行此脚本的用户的用户名附加到文件中,例如“Jason_all.txt”作为最终输出。
【问题讨论】:
标签: linux bash shell command-line filenames