I use PhpStorm. What is the differences between "Terminal"(Alt+F12) and "Run Command" (tools- run command).
Related
I have cygwin installed on a remote windows server running oracle. I am trying to run sqlplus through an ANT file in Jenkins. I use sshexec to run the command below, but it doesn't work.
I am able to make it work when I login into SSH then first type in 'cmd' to switch to the windows command prompt, then entering the sqlplus statement below is successfull.
How can I replicate the above using scripts by running the sqlplus command below in cmd.exe or run cmd.exe first then execute the sqlplus command so it works like when I perform it directly in SSH.
<target name="compile.data">
<sshexec host="${ssh.hostname}"
verbose="true"
trust="true"
username="${ssh.username}"
password="${ssh.username}"
command="sqlplus ${db.username}/${db.password}#${db.hostname}:${db.port}:${db.sid} #${script.path}testscript.sql"/>
</target>
Thanks.
I have found the answer after to my question for refernce:
<sshexec host="${ssh.hostname}"
verbose="true"
trust="true"
username="${ssh.username}"
password="${ssh.username}"
command='cmd /C "sqlplus ${db.username}/${db.password}#${db.hostname}:${db.port}:${db.sid} #${script.path}testscript.sql"'/>
This box is opened when I am trying to run the SQLCMD -L command in cmd.exe:
I have hard requirement of logging into a terminal via SSH from TCL console and relaunch a tcl script from that terminal. For this I use exec command and it does get executed. The only problem is it doesn't return back to parent code.
I have automated SSH login and it works fine from a bash/csh terminal
But from TCL console, the following happens
Simple example
exec ssh hostname pwd
puts "Done"
When I execute this code in TCL, "Done" never gets printed. I just get the output of pwd and that's it.
I have a need of looping SSH into multiple terminals and run TCL jobs on a hardware, but the loop gets stuck after executing the first SSH.
I search the internet for answers and I am not able to find any. Please help.
There could be a lot issues going on here. Running ssh with an explicit command (pwd) will usually default to not allocating a tty (ssh -T) and will run the remote shell in non-interactive mode. And the output of a command called from exec is not normally echoed to standard output, so I would not expect you to see the output if you call it from a script. You have to print the result of exec to see the output of the pwd command. Also, different shell startup scripts are run on the remote host depending on which shell the account is set up with and whether it is an interactive or non-interactive shell. It could be .bashrc, .bash_profile, .profile, .cshrc, etc., and if the script behaves differently when it has a tty vs. when it doesn't, that could explain differing behavior between a bash/csh shell and the TCL console.
Without having access to your system, it is hard for me to troubleshoot. I would start with a script like this:
set result [exec ssh -T hostname pwd]
puts "result = $result"
puts "Done."
Then I would try changing the -T to a -t and trying again. If the output of "pwd" is appearing before the "result =" line, then you can tell that the command is writing the result to a tty instead of standard output, and that's useful information for troubleshooting.
I want to run a command in the OSX terminal using the IntelliJ Idea External Tools. I don't want the command to run in the IntelliJ terminal.
This is what should happen when I run the tool:
The OSX terminal opens in a separate window
The command I want (with parameters) runs in the OSX terminal
The results of the command are displayed in the OSX terminal
The terminal is NOT closed afterwards
Is this possible?
This should be possible, however, I don't have a mac to test this on.
This is how you would do it in Windows. Maybe you can translate to the OSX equivalents.
Program cmd.exe
Parameters /c start "" cmd.exe /k dir
Working directory $FileDir$
cmd.exe is the terminal so substitute the OSX terminal command here.
/c passes commands to cmd.exe then exits
start "" cmd.exe is a Windows command to start an application "" means no title and cmd.exe says we are going to launch the command window again.
/k means do the command and then stay open
dir is the command I am doing (same as ls)
$FileDir$ is the IDEA macro for the the directory of the file you are clicking on. You can change this to other macros to what fits your need.
Im trying to install SmartBear through windows_package, however when it is executing the resource, a CMD prompt says "installing service", it closes, and then a "Run As" dialog shows, of course that dialog won't go anywhere except for a user intervention.
the error raised if i click on cancel (after waiting for a while) is:
FATAL: Mixlib::ShellOut::CommandTimeout: windows_package[SmartBear TestExecute 9.31] (smartbear::testexecute line 61) had an error: Mixlib::ShellOut::CommandTimeout: command timed out:
---- Begin output of start "" /wait "C:\chef\cache\TestExecute\setup.exe" /s /sms ----
STDOUT:
STDERR:
---- End output of start "" /wait "C:\chef\cache\TestExecute\setup.exe" /s /sms ----
Is there any workaround for it?