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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -