How is Paramiko segregating output and error message?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
If I execute jdksjdkd
in terminal from one machine to another machine using paramiko I am getting stderr.readlines()
as Command not found
.
linux
add a comment |Â
up vote
0
down vote
favorite
If I execute jdksjdkd
in terminal from one machine to another machine using paramiko I am getting stderr.readlines()
as Command not found
.
linux
That "command not found" is usually printed by the shell to its stderr. That's probably how.
â muru
Jun 27 at 6:40
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
If I execute jdksjdkd
in terminal from one machine to another machine using paramiko I am getting stderr.readlines()
as Command not found
.
linux
If I execute jdksjdkd
in terminal from one machine to another machine using paramiko I am getting stderr.readlines()
as Command not found
.
linux
edited Jun 27 at 11:13
Anthony Geoghegan
7,14233651
7,14233651
asked Jun 27 at 5:55
Abdulvakaf K
294
294
That "command not found" is usually printed by the shell to its stderr. That's probably how.
â muru
Jun 27 at 6:40
add a comment |Â
That "command not found" is usually printed by the shell to its stderr. That's probably how.
â muru
Jun 27 at 6:40
That "command not found" is usually printed by the shell to its stderr. That's probably how.
â muru
Jun 27 at 6:40
That "command not found" is usually printed by the shell to its stderr. That's probably how.
â muru
Jun 27 at 6:40
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
The PATH environment variable indicates that where the commands resides.
So in your case , since "jdksjkdk
" is not found in the $PATH
, it throws error on STDERR
file descriptor and hence you are getting stderr.readiness()
as Command not found
Explanation: There are 3 standard file descriptors, every running program in linux opens the following file descriptors
- STDIN (0) => for standard input
- STDOUT(1) => for standard output
- STDERR (2) => for standard error
So when the command was not found, the error was written to
STDERR
(
file desciptor => 2 ) , if it was successful, then output would had
been written toSTDOUT
( file descriptor => 1 ) . Since paramiko is
reading result fromSTDERR
and notSTDOUT
, this is how it is
verifying it is error not output
I believed the above statement. but in one of my case I am getting stdout(output) as stderr message. The data got swapped between this two. So that I raised this question.
â Abdulvakaf K
Jun 27 at 6:31
Maybe then it must be checking the return status of your process to check if it failed or not
â Arushix
Jun 27 at 6:35
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
The PATH environment variable indicates that where the commands resides.
So in your case , since "jdksjkdk
" is not found in the $PATH
, it throws error on STDERR
file descriptor and hence you are getting stderr.readiness()
as Command not found
Explanation: There are 3 standard file descriptors, every running program in linux opens the following file descriptors
- STDIN (0) => for standard input
- STDOUT(1) => for standard output
- STDERR (2) => for standard error
So when the command was not found, the error was written to
STDERR
(
file desciptor => 2 ) , if it was successful, then output would had
been written toSTDOUT
( file descriptor => 1 ) . Since paramiko is
reading result fromSTDERR
and notSTDOUT
, this is how it is
verifying it is error not output
I believed the above statement. but in one of my case I am getting stdout(output) as stderr message. The data got swapped between this two. So that I raised this question.
â Abdulvakaf K
Jun 27 at 6:31
Maybe then it must be checking the return status of your process to check if it failed or not
â Arushix
Jun 27 at 6:35
add a comment |Â
up vote
2
down vote
The PATH environment variable indicates that where the commands resides.
So in your case , since "jdksjkdk
" is not found in the $PATH
, it throws error on STDERR
file descriptor and hence you are getting stderr.readiness()
as Command not found
Explanation: There are 3 standard file descriptors, every running program in linux opens the following file descriptors
- STDIN (0) => for standard input
- STDOUT(1) => for standard output
- STDERR (2) => for standard error
So when the command was not found, the error was written to
STDERR
(
file desciptor => 2 ) , if it was successful, then output would had
been written toSTDOUT
( file descriptor => 1 ) . Since paramiko is
reading result fromSTDERR
and notSTDOUT
, this is how it is
verifying it is error not output
I believed the above statement. but in one of my case I am getting stdout(output) as stderr message. The data got swapped between this two. So that I raised this question.
â Abdulvakaf K
Jun 27 at 6:31
Maybe then it must be checking the return status of your process to check if it failed or not
â Arushix
Jun 27 at 6:35
add a comment |Â
up vote
2
down vote
up vote
2
down vote
The PATH environment variable indicates that where the commands resides.
So in your case , since "jdksjkdk
" is not found in the $PATH
, it throws error on STDERR
file descriptor and hence you are getting stderr.readiness()
as Command not found
Explanation: There are 3 standard file descriptors, every running program in linux opens the following file descriptors
- STDIN (0) => for standard input
- STDOUT(1) => for standard output
- STDERR (2) => for standard error
So when the command was not found, the error was written to
STDERR
(
file desciptor => 2 ) , if it was successful, then output would had
been written toSTDOUT
( file descriptor => 1 ) . Since paramiko is
reading result fromSTDERR
and notSTDOUT
, this is how it is
verifying it is error not output
The PATH environment variable indicates that where the commands resides.
So in your case , since "jdksjkdk
" is not found in the $PATH
, it throws error on STDERR
file descriptor and hence you are getting stderr.readiness()
as Command not found
Explanation: There are 3 standard file descriptors, every running program in linux opens the following file descriptors
- STDIN (0) => for standard input
- STDOUT(1) => for standard output
- STDERR (2) => for standard error
So when the command was not found, the error was written to
STDERR
(
file desciptor => 2 ) , if it was successful, then output would had
been written toSTDOUT
( file descriptor => 1 ) . Since paramiko is
reading result fromSTDERR
and notSTDOUT
, this is how it is
verifying it is error not output
answered Jun 27 at 6:21
Arushix
9968
9968
I believed the above statement. but in one of my case I am getting stdout(output) as stderr message. The data got swapped between this two. So that I raised this question.
â Abdulvakaf K
Jun 27 at 6:31
Maybe then it must be checking the return status of your process to check if it failed or not
â Arushix
Jun 27 at 6:35
add a comment |Â
I believed the above statement. but in one of my case I am getting stdout(output) as stderr message. The data got swapped between this two. So that I raised this question.
â Abdulvakaf K
Jun 27 at 6:31
Maybe then it must be checking the return status of your process to check if it failed or not
â Arushix
Jun 27 at 6:35
I believed the above statement. but in one of my case I am getting stdout(output) as stderr message. The data got swapped between this two. So that I raised this question.
â Abdulvakaf K
Jun 27 at 6:31
I believed the above statement. but in one of my case I am getting stdout(output) as stderr message. The data got swapped between this two. So that I raised this question.
â Abdulvakaf K
Jun 27 at 6:31
Maybe then it must be checking the return status of your process to check if it failed or not
â Arushix
Jun 27 at 6:35
Maybe then it must be checking the return status of your process to check if it failed or not
â Arushix
Jun 27 at 6:35
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f452145%2fhow-is-paramiko-segregating-output-and-error-message%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
That "command not found" is usually printed by the shell to its stderr. That's probably how.
â muru
Jun 27 at 6:40