so you are looking for a condition to be redirected to /dev/null?
maybe i'm not following exactly what you are trying to say.
but you can always direct things to /dev/null basically for test condition status (fail/succeed).
Hi all,
I need to redirect stdout and stderr to a file in a ksh shell. That's not a problem. But I need also the correct exit code for the executed command. In the example below I redirect correctly the stdout & stderr to a file, but I have the exit code of tee command and not for the mv... (2 Replies)
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)
This is about getting all output to stderr and stdout localized. Nothing to do with redirecting output to a file (there already are some interesting threads about that issue on this forum).
What I intend to do is capturing all lines of text sent to the screen, compare them with an array of... (2 Replies)
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)
Friends
I have to redirect STDERR messages both to screen and also capture the same in a file.
2 > &1 | tee file works but it also displays the non error messages to file, while i only need error messages.
Can anyone help?? (10 Replies)
Hello Friends,
sorry, i am not very familiar with Unix programming. Could you please help me on this?
We have to start different components from a startup script.
each components are started as below in the background in a startprocess function
$nohup $file $args >>$logFile 2>&1 &
... (0 Replies)
Hi folks :)
Can deamonized process access to stderr, stdout?
I 'm trying to display error_num/return value of a function run() in stderr using
fprintf(stderr, "function run() returns = %d", ret_val);
run() is called after deamonizing the process. (1 Reply)
Currently I am redirecting STDERR and STDOUT to a log file by doing the following
{
My KSH script contents
} 2>&1 | $DEBUGLOG
Problem is the STDERR & STDOUT do not have any date/time associated.
I want this to be something that i can embed into a script opposed to an argument I use... (4 Replies)
Dear all,
redirecting STDOUT & STDERR to file is quite simple, I'm currently using:
exec 1>>/tmp/tmp.log; exec 2>>/tmp/tmp.logBut during script execution I would like the output come back again to screen, how to do that?
Thanks
Lucas (4 Replies)
Dear all,
redirecting STDOUT & STDERR to file is quite simple, I'm currently using:
Code:
exec 1>>/tmp/tmp.log; exec 2>>/tmp/tmp.log
But during script execution I would like the output come back again to screen, how to do that?
Thanks
Luc
edit by bakunin: please use CODE-tags like the... (6 Replies)
Discussion started by: tmonk1
6 Replies
LEARN ABOUT LINUX
init
init(8) System Manager's Manual init(8)NAME
init - Upstart process management daemon
SYNOPSIS
init [OPTION]...
DESCRIPTION
init is the parent of all processes on the system, it is executed by the kernel and is responsible for starting all other processes; it is
the parent of all processes whose natural parents have died and it is responsible for reaping those when they die.
Processes managed by init are known as jobs and are defined by files in the /etc/init directory. See init(5) for more details on configur-
ing Upstart.
Events
init(8) is an event-based init daemon. This means that jobs will be automatically started and stopped by changes that occur to the system
state, including as a result of jobs starting and stopping.
This is different to dependency-based init daemons which start a specified set of goal jobs, and resolve the order in which they should be
started and other jobs required by iterating their dependencies.
For more information on starting and stopping jobs, as well as emitting events that will automatically start and stop jobs, see the manual
page for the initctl(8) tool.
The primary event is the startup(7) event, emitted when the daemon has finished loading its configuration. Other useful events are the
starting(7), started(7), stopping(7) and stopped(7) events emitted as jobs change state.
See upstart-events(7) for a summary of well-known events.
System V compatibility
The Upstart init(8) daemon does not keep track of runlevels itself, instead they are implemented entirely by its userspace tools. The
event emitted to signify a change of runlevel is the runlevel(7) event. For more information see its manual page.
OPTIONS
Options are passed to init(8) by placing them on the kernel command-line.
--confdir directory
Read job configuration files from a directory other than /etc/init.
--no-sessions
Disable user and chroot sessions.
--no-startup-event
Suppress emission of the initial startup event. This option should only be used for testing since it will stop the init(8) daemon
from starting any jobs automatically.
--session
Connect to the D-Bus session bus. This should only be used for testing.
--startup-event event
Specify a different initial startup event from the standard startup(7).
--verbose
Outputs verbose messages about job state changes and event emissions to the system console or log, useful for debugging boot.
NOTES
init is not normally executed by a user process, and expects to have a process id of 1. If this is not the case, it will actually execute
telinit(8) and pass all arguments to that. See that manual page for further details.
FILES
/etc/init.conf
/etc/init/*.conf
$HOME/.init/
AUTHOR
Written by Scott James Remnant <scott@netsplit.com>
REPORTING BUGS
Report bugs at <https://launchpad.net/upstart/+bugs>
COPYRIGHT
Copyright (C) 2009-2011 Canonical Ltd.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO control-alt-delete(7)init(5)initctl(8)runlevel(7)startup(7)starting(7)started(7)stopping(7)stopped(7)telinit(8)upstart-events(7)Upstart 2011-04-06 init(8)