> -----Original Message----- > From: Gar Nelson [mailto:gar.nelson@noaa.gov] > Sent: Friday, April 05, 2002 3:30 PM > To: shorewall-users@shorewall.net > Subject: [Shorewall-users] STDERR messages > > > I already deleted the earlier message, but it got me thinking anyway. > The question was about all the iptables messaages that get > output to the > main console terminal. Tom said something like ''just redirect STDERR''. > > Okay. Looking at Marcel Gagne''s Linux Sys Admin book, he talks about > STDERR on page 54 with the illustration; > > command-name 2>&1 > logfile.out > > Next I looked at /etc/rc/d/init.d/shorewall and found >At least with bash -- the correct syntax to redirect stderr onto stdout is: command-name >/tmp/log 2>&1 not... command-name 2>&1 >/tmp/log Note the order of redirection. Steve Cowles
> -----Original Message----- > From: Tom Eastep [mailto:teastep@shorewall.net] > Sent: Friday, April 05, 2002 3:59 PM > To: Gar Nelson > Cc: shorewall-users@shorewall.net > Subject: Re: [Shorewall-users] STDERR messages > > > What I was suggesting is that you: > > /etc/init.d/shorewall start > /tmp/shorewall.log 2>&1 > > or something similar.Personall, I have not tried this from the console, but I have used nohup when I need to start daemons/shell scripts while using telnet/ssh sessions that I do not want associated with a terminal after I logout. i.e. nohup /etc/init.d/shorewall start Steve Cowles
"Cowles, Steve" wrote:> > > -----Original Message----- > > From: Gar Nelson [mailto:gar.nelson@noaa.gov] > > Sent: Friday, April 05, 2002 3:30 PM > > To: shorewall-users@shorewall.net > > Subject: [Shorewall-users] STDERR messages > > > > > > I already deleted the earlier message, but it got me thinking anyway. > > The question was about all the iptables messaages that get > > output to the > > main console terminal. Tom said something like ''just redirect STDERR''. > > > > Okay. Looking at Marcel Gagne''s Linux Sys Admin book, he talks about > > STDERR on page 54 with the illustration; > > > > command-name 2>&1 > logfile.out > > > > Next I looked at /etc/rc/d/init.d/shorewall and found > > > > At least with bash -- the correct syntax to redirect stderr onto stdout is: > > command-name >/tmp/log 2>&1 > > not... > > command-name 2>&1 >/tmp/log > > Note the order of redirection.Indeed! And Tom did address that in his followup message. I did find that in my O''Reilly Bash book (pg 168) once you pointed that out, but the Sys Admin book by Gagne is what I''m currently reading. Thanks to both for the heads up on the order of redirection. Gar