4 ms·
Until you want something more specific like listing absolute paths of those directories without the metadata ls -l | grep '^d' | awk '{print $9}' | xargs realp
by Riverheart 6y ago
Until you want something more specific like listing absolute paths of those directories without the metadata
ls -l | grep '^d' | awk '{print $9}' | xargs realpath
Or
ls -ld "$PWD"/* | grep '^d' | awk '{print $9}'
Guessing Crush could just add another property called Fullpath you can echo in the next pipe after filtering.
ls | where {type == "directory"} | select %Fullpath
Maybe he adds a --dir flag
ls --dir | select %Fullpath
- inshadows 6y ago% find . -maxdepth 1 -type d | xargs realpath How long do these tools exist? Over 20 years?
- Riverheart 6y agoThe example works but you need to understand the idiosyncrasies of all the tools involved and the text format. Once you learn that you're passing around structured data and you access it the same way it becomes trivial get data.
- inshadows 6y agoYes, you have to learn the idiosyncrasies of the tools involved. My point was, these are standard tools that are there for more than 20 years, and they work just fine. People should just RTFM and learn by experience instead of inventing something new which looks shiny on surface but most certainly will have unhandled hidden edge cases and serious limitations.