Forward the exit status from the remote command
See original GitHub issuePlease change the mssh command to forward the exit status of the remote command the same way ssh does.
The man page from ssh describing this:
EXIT STATUS ssh exits with the exit status of the remote command or with 255 if an error occurred.
Example:
kim@splint:~$ mssh ec2-user@i-012345678990 exit 42 ; echo $?
0
kim@splint:~$
This should echo 42
instead of 0
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How to get exit code of remote command through ssh
1. Formally, to "store" the exit status we should assign it to a variable: ssh remotehost 'do something' ; retcode=$? and it's "stored"...
Read more >Getting the exit status of a remote command
Hi All, I am using the following code to move files from one folder to another on the remote server: ssh username@server <<EOF...
Read more >How Expect can capture the exit code from a remote command
How Expect can capture the exit code from a remote command. LGT An example running on unix platform, we execute one command (for...
Read more >How do I find the exit status of a remote command executed ...
|| : Execute command only if command returns an exit status of non zero. So following command will never display Command failed message:...
Read more >Get exit code of a executed remote command
first one, but I am not sure. ... send the EOF yet. ... > that seems to work, thanks a lot for your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @yellowtailfan, thanks for providing this! I’m not aware of that fork, however I would recommend verifying that code before using it.
And to everyone else, sorry for the delays in keeping CLI updated. We are now actively working on releasing a new version with some improvements.
Hey man this is a real life saver, thanks for the link !
On Mon, 22 Jun 2020 at 12:03, Matthew Arnison notifications@github.com wrote:
– Pozdrawiam,
Leszek Błażewski
https://www.e-korepetycje.net/beard
https://www.linkedin.com/in/leszek-blazewski/