I’m using a find command which results in multiple lines for result, I then want to pipe each of those lines into an ls command with the-l option specified.
find . -maxdepth 2 -type f |<some splitting method> | ls -l
I want to do this in one “command” and avoid writing to a file.
I believe this is what you are looking for:
Explanation:
find . -maxdepth 2 -type f: find files with maxdepth at 2-exec ls -l {} \;For each such result found, runls -lon it;{}specifies where the results from find would be substituted into.