Search Results

Search: Posts Made By: MDominok
3,157
Posted By RudiC
Do I get it right: you want three files, one for...
Do I get it right: you want three files, one for stdout, one for stderr, and one to capture both in one single file? Would this do what you want:
{ { ls -la file fie | tee log1; } 2>&1 >&3 | tee...
3,157
Posted By Peasant
For instance can a simple example help : ...
For instance can a simple example help :

exec ${command} ${command_parameters} 1>> my._$(date +%s)_$$.log 2>> my._$(date +%s)_$$.err


Can you specify your problem to more detail ?
What do you...
3,157
Posted By MadeInGermany
The >> redirects descriptor 1 to the file, so...
The >> redirects descriptor 1 to the file, so there is nothing left for the following | tee
I think you want
(( exec ${command} ${command_parameters} 3>&1 1>&2 2>&3 ) | tee -a...
3,157
Posted By jim mcnamara
For Solaris 10 onward you have bash as part of...
For Solaris 10 onward you have bash as part of the standard distribution. ksh88 is a good shell but bash has some better features for this kind of project. SuSe and RH both use bash by default. ...
3,157
Posted By Scrutinizer
Pipelines only connect stdout to stdin of the...
Pipelines only connect stdout to stdin of the next command and do nothing for stderr or other file descriptors. So tee will only receive stdout of the first command and fiddling with file descriptors...
1,863
Posted By Corona688
and on systems that don't, I believe you can just...
and on systems that don't, I believe you can just do

ps $pid >/dev/null 2>/dev/null || echo "$pid is dead"
1,863
Posted By MadeInGermany
A further improvement: In Solaris and Linux you...
A further improvement:
In Solaris and Linux you can simply test for a known PID like this
if [[ -d /proc/${edii_pid} ]]; then
echo "still alive"
else
echo "dead"
fi
1,863
Posted By MadeInGermany
I guess the state becomes S (sleeping) that you...
I guess the state becomes S (sleeping) that you are discarding with grep.
Improvement:
edii_pid_runnning=`ps -p ${edii_pid} -o s=`
And
edii_pid_listed=`ps -p ${edii_pid} -o pid=`
The = omits the...
1,863
Posted By fpmurphy
Suggest you modify your script to better capture...
Suggest you modify your script to better capture the raw process state. Something like the following (which I have not tested):

edii_pid_runnning=`ps -p ${edii_pid} -o s`...
1,863
Posted By jim mcnamara
I am confused by what you say you see. Processes...
I am confused by what you say you see. Processes either exist in the kernel process masthead or they do not exist. A non-running (terminated) process that has not been waited for is a zombie -...
281,204
Posted By Neo
Simple rules of the UNIX.COM forums:
RULES OF THE UNIX AND LINUX FORUMS

For the latest version of the community rules (the official community rules page), please visit here. (https://www.unix.com/misc.php?do=cfrules)


No flames,...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 02:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy