Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print and append!!

Status
Not open for further replies.
Sep 22, 2004
27
0
0
US
HI group,
im trying to do the following:
print a statement "im learning unix"
append the contents of a file
print another line at the end.
---all into one single file.

expected output:

im learing unix
--- contents from a file--------
1
2
3
4
------conetnts from the line ends--
lastline " > output.dat
i guess this must be pretty simple, but im just trying to get the hang of it.
Thanks for your time and help
roe

 
(echo "im learing unix";cat /path/to/file;echo "lastline") > output.dat

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top