copying files from another server and printing it in local notepads
I have been trying to do this experiment.
I am telnetting to a remote server running on linux and doing my work. Often it requires to copy the contents of files in that server and then paste (simply do a select all , copy and then paste)it in my local file( an editor like notepad , word etc). I then take out a print out (hard copy) of this file and read this file according to my own sweet pace. This I do , because often it is pretty cumbersome to read the whole of the file from the window specially when some of them have around 10,000 lines of codes.
While doing this I face 2 difficulties viz.
1.) Sometimes I miss some of the sections because I accidentally scroll down too much while reading from the server copy of the file.
2.) In notepad I have to manually maintain the cursor position to the next line before a fresh paste.I am trying to elaborate the second problem.Say I have copied 500 lines from the server file and copied the same into my local file.Now I have to manually go and place the cursor position so that the next time I do a paste the pasting is starts from desired position, otherwise it leaves some space and then prints.
Now I am trying to write a program ( a shell script) that will fetch the contents from the server file and print it in my local file. I know how to do this in server file.Say for eg if I do the following
cat file_name > report_file
then report file will contain the contents of file_name.But how can I do this if want to print in my local file ie I want report_file as a local file.
Please help me with the programming concepts reqd to write the above shell script.It will be really helpful
Thanks and Warm Regards