awk - bash - padding find results -
i'm running following command directory listing:
find ./../ \ -type f -newer ./lastsearchstamp -path . -prune -name '*.txt' -o -name '*.log' \ | awk -f/ '{print $nf " - " $filename}'
is there way can format output in 2 column left indented layout output looks legible?
the command above adds constant spacing between filename , path.
expected output:
abc.txt /root/somefolder/someotherfolder/ helloworld.txt /root/folder/someotherfolder/ a.sh /root/folder/someotherfolder/scripts
i nice tool kind of thing column -t
. add command on end of pipeline:
find ... | awk -f/ '{print $nf " - " $filename}' | column -t
Comments
Post a Comment