Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Printing Content of File

    I have this command (line):
    tail -52 | find "/path/" -name "*.csv"
    Instead of printing the contents of each file, the command prints the location of each file.
    What am I doing wrong?

  2. #2
    Try using cat with the backtick operator, e.g.:
    cat `tail -52 | find "/path/" -name "*.csv"`
    The backtick operator causes the enclosed string to be executed. Then that string is replaced with the output of the command, and the rest of the command line is executed with the replacement. So cat receives a list of file names as arguments, and it prints the contents of each listed file.

  3. #3
    Thanks. It worked . (Well the reverse way: find "/path/" -name "*.csv"`| cat tail -52)

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts