Awk example:
ls -l | awk '{print $9, $5}' or ls -lh | awk '{print $9, $5}'
Seems a whole lot simpler. To me. I find if you have to write exhaustive shell scripts then maybe you can look for something more verbose like Perl, I guess.
> The print statement shall write the value of each expression argument onto the indicated output stream separated by the current output field separator (see variable OFS above), and terminated by the output record separator (see variable ORS above).
The default value for OFS is <space> and for ORS, <newline>.
No, lack of commas in output and broken filenames with spaces.
ls -l | awk '{print $9 "\t" $5}'
That is about as much as i'm willing to do for this.
Even though there's frequently value in adding whitespace to programs, many of them are just fine as one liners :)
e.g. this gets the title of a webpage for you: ``` $ perl -Mojo -E 'say g("mojolicious.org")->dom->at("title")->text' ```