Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
_pvxk
on June 3, 2015
|
parent
|
context
|
favorite
| on:
Looking Forward: Support for Secure Shell
> And if I never have to parse the output of ls -l using cut again, I will be a happy person.
Try stat instead, e.g.
$ stat -c 'NAME: %n; OWNER: %U, SIZE: %s' *
also supports --printf (see man stat).
david-given
on June 3, 2015
[–]
It's not standard enough --- coreutils and OSX's work differently.
_pvxk
on June 3, 2015
|
parent
[–]
Yeah, same with the find -printf (at least macports can install coreutils and give you "gstat"). Portability is hard :-/
http://mywiki.wooledge.org/ParsingLs
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Try stat instead, e.g.
also supports --printf (see man stat).