10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I have a requirement to redirect stdout and stderr to 'log' file and stderr alone to 'err' file.
Can someone please help me with this?
Thanks in advance (2 Replies)
Discussion started by: vikas_trl
2 Replies
2. Shell Programming and Scripting
Hi,
I've been using the following commands in my automated scripts, to ensure that all text output is sent to a log file instead of to the screen:
exec 1>>$SCRIPT_LOG_FILE
exec 2>>$SCRIPT_LOG_FILE
However, I've now discovered that the system used for automating the script executions... (4 Replies)
Discussion started by: confusedAdmin
4 Replies
3. Shell Programming and Scripting
Hi all,
can someone help me with the next redirection?
i want to redirect the stdout+stderr of a command to the same file (this i can do by prog &> file)
but in addition i want to redirect only the stderr to a different file.
how can i do this please? (in BASH)
thanks. (4 Replies)
Discussion started by: eee
4 Replies
4. Shell Programming and Scripting
Can somebody explain to me why the diff output is not going to stderr?
Yet when I issue a diff from the command line the return code is -ne 1.
I am guessing diff always writes to stdout???
Is there away I can force the difff to write to stderr USING THE CURRENT
template. If possible, I... (5 Replies)
Discussion started by: BeefStu
5 Replies
5. Red Hat
Hi all. I am trying to use backticks in Perl to put STDERR into a string. The code is...
$readkey_test = `perl -MTerm::ReadKey -e 1`;
print $readkey_test;
if ($readkey_test =~ m/]/)
{
print "ReadKey not installed...\n";
}
else
{
print "ReadKey installed...\n";
}
If it comes up... (3 Replies)
Discussion started by: austinharris43
3 Replies
6. Shell Programming and Scripting
I'm not a complete novice at unix but I'm not all that advanced either. I'm hoping that someone with a little more knowledge than myself has the answer I'm looking for.
I'm writing a wrapper script that will be passed user commands from the cron...
Ex:
./mywrapper.sh "/usr/bin/ps -ef |... (1 Reply)
Discussion started by: sumgi
1 Replies
7. Shell Programming and Scripting
Hi All,
Solarix/Bash v3x
Im trying to output any standard errors created by the script to a file using the below command:
. runDTE.sh 2> "$DTE_ERROR_FILE"
however the errors do get written to the dir/file stored in $DTE_ERROR_FILE but the error does not appear on the terminal screen in... (4 Replies)
Discussion started by: satnamx
4 Replies
8. UNIX for Advanced & Expert Users
Hello Everyone!
I'm trying to combine output for standard output and for possible standard error to the log file. I was trying to use tee command, but it turned out if error occurred error output will be send to the screen only and will not be redirected with tee command to the log file.
Anyone... (11 Replies)
Discussion started by: slavam
11 Replies
9. Shell Programming and Scripting
#!/usr/bin/perl
open(STDOUT, ">>$Textfile")
open(STDERR, ">>$Textfile")
print "program running\n";
$final = join("+", $initial,$final) #5
close (STDOUT);
close (STDERR);Hi all, above is my perl code. Notice i have captured the stdout and stderr to the same textfile. my code is expected to... (1 Reply)
Discussion started by: new2ss
1 Replies
10. Shell Programming and Scripting
How can I redirect and append stdout and stderr to a file when using cron? Here is my crontab file:
*/5 * * * * /dir/php /dir/process_fns.php >>& /dir/dump.txt
Cron gives me an 'unexpected character found in line' when trying to add my crontab file.
Regards,
Zach Curtis
POPULUS (8 Replies)
Discussion started by: zcurtis
8 Replies