09-12-2002
Hello,
What patch did you apply and what user is running the script? Is it being run via cron?
I tried running a simple script on my system with 1>&2 and didn't really see it redirect anything anywhere. I think what you meant was 2>&1. I tried running the script with just 2>&1 as well and it did nothing. What I normally do is run the script and redirect like this:
./script >> logfile.log 2>&1
This will place STDERR and STROUT into the logfile.log.
Good Luck,
Tony
10 More Discussions You Might Find Interesting
1. 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
2. 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
3. Shell Programming and Scripting
In bash, I need to send the STDOUT and STDERR from a command to one file, and then just STDERR to another file. Doing one or the other using redirects is easy, but trying to do both at once is a bit tricky. Anyone have any ideas? (9 Replies)
Discussion started by: jshinaman
9 Replies
4. 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
5. Shell Programming and Scripting
I have been doing this:
make xyz &> xyz.log &; tail -f xyz.log
The problem with this is that you never can ge sure when "make xyz" is done.
How can I pipe both stderr and stdout into tee so both stderr and stdout are copied both to the display and to the log file?
Thanks,
Siegfried (3 Replies)
Discussion started by: siegfried
3 Replies
6. Shell Programming and Scripting
I have searched the forum and seems like I
just don't quite find my question.
I have a script that runs out of cron and I
am trying to send normal successful stdout
to /dev/null, but if there is an error, I
want both stdout/stderr to go to mail.
In other words, I only want to know... (2 Replies)
Discussion started by: niswonp
2 Replies
7. Red Hat
EDIT: Nevermind, figured it out! Forgot to put backslashes in my perl script to not process literals!
Hi everyone. I am trying to have this command pass silently. (no output)
chsh -s /bin/sh news
Currently it outputs.
I've tried....
&> /dev/null
1> /dev/null
2>&1 /dev/null
1>&2... (1 Reply)
Discussion started by: austinharris43
1 Replies
8. 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
9. Programming
I originally wrote my script using the korn shell and had to port it to bash on a another server. My script is working find for backing up but noticed that now after the move, I am not getting any output to my log files.
Using Korn shell, this worked for me for some odd reason. This was sending... (2 Replies)
Discussion started by: metallica1973
2 Replies
10. 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
LEARN ABOUT OPENSOLARIS
avahi-dnsconfd
avahi-dnsconfd(8) System Manager's Manual avahi-dnsconfd(8)
NAME
avahi-dnsconfd - Unicast DNS server from mDNS/DNS-SD configuration daemon
SYNOPSIS
avahi-dnsconfd [options]
avahi-dnsconfd --kill
avahi-dnsconfd --refresh
avahi-dnsconfd --check
DESCRIPTION
avahi-dnsconfd connects to a running avahi-daemon and runs the script /etc/avahi/dnsconfd.action for each unicast DNS server that is
announced on the local LAN. This is useful for configuring unicast DNS servers in a DHCP-like fashion with mDNS.
OPTIONS
-D | --daemonize
Daemonize after startup and redirect log messages to syslog.
-s | --syslog
Log to syslog instead of STDERR. Implied by --daemonize.
-k | --kill
Kill an already running avahi-dnsconfd. (equivalent to sending a SIGTERM)
-r | --refresh
Tell an already running avahi-dnsconfd to refresh the DNS server data. (equivalent to sending a SIGHUP)
-c | --check
Return 0 as return code when avahi-dnsconfd is already running.
-h | --help
Show help
-v | --version
Show version information
FILES
/etc/avahi/avahi-dnsconfd.action: the script to run when a DNS server is found or removed.
SIGNALS
SIGINT, SIGTERM: avahi-dnsconfd will shutdown. This is issued by passing --kill to avahi-daemon.
SIGHUP: avahi-dnsconfd will refresh the DNS server data.
AUTHORS
The Avahi Developers <avahi (at) lists (dot) freedesktop (dot) org>; Avahi is available from http://avahi.org/
SEE ALSO
avahi-daemon(8), avahi-dnsconfd.action(8)
COMMENTS
This man page was written using xml2man(1) by Oliver Kurth.
Manuals User avahi-dnsconfd(8)