Hacker News new | ask | show | jobs
by eternalban 1327 days ago
Wouldn't 'find .. -exec ' and friends get you this?

    find . -type f -depth 1 -exec ls -la {} + | awk {'print "file="$9 " user=" $3 " group=" $4 " size=" $5'}
1 comments

Your awk has to put out file="..." notation, and if double quotes occur, they have to be escaped. So you're looking at substantially longer command.

  | awk 'function esc(str) {
         ...
         }
         { print "file=\"" esc($9) " user=\"" ... }'