Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

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.

asked Sep 13, 2013 in Java Interview Questions by anonymous
edited Sep 12, 2013
0 votes

Related Hot Questions

Government Jobs Opening