4 ms·
> 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:
by unhammer 11y ago
> 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 11y agoIt's not standard enough --- coreutils and OSX's work differently.
- unhammer 11y agoYeah, same with the find -printf (at least macports can install coreutils and give you "gstat"). Portability is hard :-/ http://mywiki.wooledge.org/ParsingLs http://mywiki.wooledge.org/ParsingLs