I am working on a script that calls several system commands to change some OS settings and run some other commands. I want to try to capture stderr for when something goes wrong. I have been able to do this, however, all I get is the output from the command. Is there a way to tell/capture...
I am running the script as root on the server so there is no issue with permissions.
That being said I let the script run to completion this time and it looks like it dumps all the output to the file at the same time once the script completes. Though when I run it normally it prints stuff to...
permissions isn't the issue. Before attempting to write to the file I touch it and chmod it to 777:
system("touch image_report.out");
system("chmod 777 image_report.out");
open (OUTFILE, '>>image_report.out');
I have a perl script that works great and prints the output to the console screen. However, if I try to redirect the output on the command line, nothing gets printed to the file. I tried modifying the script to print to a file instead of the screen but get the same results (nothing in the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.