Hi friends! 🤓 I am on a gnulinux and trying to list all files in the active directory and it’s subdirectories. I then want to pipe the output to “cat”. I want to pipe the output from cat into grep.

Please help! 😅

  • Shadow@lemmy.ca
    link
    fedilink
    arrow-up
    14
    ·
    10 months ago

    To answer your og question since it is a valuable tool to know about, xargs.

    ls | xargs cat | grep print

    Should do what you want. Unless your file names have spaces, then you should probably not use this.