pass commands server using perl openssh
That remote command expects to be run in interactive mode. This doesn't work with the SSH command mode. See this Net::OpenSSH FAQ!
You can:
- find a way to pass commands as arguments to that script.
- rewrite it to accept commands as arguments.
- talk to it using Expect.
Clearcase and java process : changing view does not apply
Don't use cleartool setview
. It spawns a sub-shell which will make all your other command not working (since they are executed in the parent shell)
Always use the full path of a dynamic view:
/view/aView/vobs/aVob/....
You will find the very same issue (and the very same advice "don't use setview") in:
- "Dynamic views of ClearCase not integrating in Jenkins"
- "using SSH to run a cleartool command with agruments on remote a linux machine"
- "script doesn't run while executing in clearcase"
You will find a concrete example of that issue in "Python and ClearCase setview".
Executing an Expect script from different locations
If your path is correctly set on both servers, you could use /usr/bin/env
:
#!/usr/bin/env expect
That would use the expect as found in the PATH
(/usr/bin
in one case, /clearlib/vobs/otherdir/bin
in the other)
By instead using
env
as in the example, the interpreter is searched for and located at the time the script is run.
This makes the script more portable, but also increases the risk that the wrong interpreter is selected because it searches for a match in every directory on the executable search path.
It also suffers from the same problem in that the path to theenv
binary may also be different on a per-machine basis.
And if you have issue with setting the right PATH
, then "/usr/bin/env
questions regarding shebang line pecularities" can help.
Related Topics
Can Libpcap Reassemble Tcp Segments
Raspberry Pi Refusing Connection to Bottle Server
Rust Linux Version Glibc Not Found - Compile for Different Glibc/Libc6 Version
Linux, Serial Port, Non-Buffering Mode
Undefined Reference to 'Pthread_Init' When Using -Lpthread Flag:
How Does Gdb Start an Assembly Compiled Program and Step One Line at a Time
Linux Split a Column into Two Different Columns in a Same CSV File
Serialport in Mono in Linux Not Responding to Datareceived Event
Is Ethernet Checksum Exposed via Af_Packet
Why Fftw on Windows Is Faster Than on Linux
How to Identify the User Who Owns a Process from /Proc/Pid
How to Print the Nth (5Th) Line of Every File Preceded by the Filename Using Any Linux Tool
Docker Overlay2: Error Walking File System: Oserror [Errno 40] Too Many Levels of Symbolic Links
Cuda 5.0: Replacement for Cutil.H
Sed: Matching on 2 Patterns on the Same Line
How to Delete Files Over (N) Days Old But Leave (N) Files Regardless of Age
Python3 Unicodeencodeerror When Run via Synology Task Scheduler