If outputfile does exist output from the current run

Info icon This preview shows pages 4–6. Sign up to view the full content.

If output.file does exist, output from the current run of the program will be appended to the end of the file . If you use this option, be very careful not confuse yourself with respect to what output came from which execution of your program. ` Both of these examples would expect input to come from the keyboard and any Unix/Linux errors would be sent to the screen 4
Image of page 4

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

` In most instances, it’s not a good idea to redirect stderr , but from time to time… ` Example 1: % prog1 2> error.file ` This will run prog1 and write any Unix/Linux error messages to error.file If error.file does not exist, it will create one. If error.file does exist, any data currently in the file will be erased and only error messages from the most current run of prog1 will be in the file. If you do not use a full pathname for the error file, it will look for the file in the current directory ` Example 2: % prog1 2>> error.file ` This will run prog1 and write any Unix/Linux errors to error.file If error.file does not exist, it will create one. If error.file does exist, output from the current run of the program will be appended to the end of the file . If you use this option, be very careful not confuse yourself with respect to what errors came from which execution of your program. It would be sad to find out that you stayed up all night
Image of page 5
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern