Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
boostr.in questions - Question:add line at top and bottom of file before sending it to pipe
I have a text file, say, text.
What I want to do is to put the text file into pipe (as in cat text |), but with added line at top and bottom - but without creating a new file (because the text file is kind of big) or modifying it.
Is that possible? I was thinking echo $(echo "line"; cat text; echo "line") but I don't like that.
Sep 13, 2013
Java Interview Questions
Sep 12, 2013
to add a comment.
Related Hot Questions
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please