Bash: "xargs cat", adding newlines after each file

Posted by NoozNooz42 on Stack Overflow See other posts from Stack Overflow or by NoozNooz42
Published on 2010-06-03T14:01:30Z Indexed on 2010/06/03 14:04 UTC
Read the original article Hit count: 356

Filed under:
|
|

I'm using a few commands to cat a few files, like this:

 cat somefile | grep example | awk -F '"' '{ print $2 }' | xargs cat

It nearly works, but my issue is that I'd like to add a newline after each file.

Can this be done in a one liner?

(surely I can create a new script or a function that does cat and then echo -n but I was wondering if this could be solved in another way)

© Stack Overflow or respective owner

Related posts about bash

Related posts about xargs