No, it passes ./test.sh to bash on the remote machine.
But argument file.txt is put on the ssh command; put it on the script instead:
Here you definitely need the -s option, otherwise bash would read its commands from file.txt
NB: file.txt must be present on the remote machine. A simple ssh command can only pass one stream that is ./test.sh
Last edited by MadeInGermany; 09-24-2014 at 03:48 PM..
hi unix guru's
i am new to unix shell programming.
i found a trouble in executing a script(bali.ksh) which is available on serverA with username xyza, this script contains sqlplus command to retrive the data from the database available on other serverC.
Now i need to run the above script... (4 Replies)
Hi All,
I want to execute some commands on unix machine from the mac machne. I have two options for doing so, I am confused which is the best way of doing. Here are two options.
Requirement:
Execute command on the remote server machine. Commands to be executed itself contain arguments to be... (0 Replies)
Hi,
I need to login into remote server and execute a shell script over there.
As of now i am making use of ssh command
ssh primUser@135.254.242.2 sh /poll.sh
I am logging in as primUser but unless i change the user to root the script execution on the remote machine is not possible.
... (5 Replies)
how to use ssh to run shell script on a remote machine?
ssh user@remote sh ./script.unx
i ran the above command
./script.unx HAS NOHUP COMMAND IN ITS BODY, I AM GETTING ERROR AS NOHUP NOT FOUND...
i tried to run that script from remote server, its working fine
do ineed to set... (6 Replies)
So, is there way of automating this ?
My ultimate goal is to run some cmd script in windows and it should connect to a remote unix host and run a script x.sh located on the remote unix host.
I was wanting to achieve this by using WinSCP and Putty only. If possible let me know how and if not... (25 Replies)
how to execute shell script present in unix machine remotely from windows?
I having a shell script in my unix machine, need to execute the script remotely from my windows machine using Visual Basic or VBA macros.
Thanks In Advance.
--Suresh (1 Reply)
I'm in a situation where I am executing a shell script(Bash) on another machine remotely using ssh, and for various reasons sometimes need to quit it and restart it. The shell script being run does many different things, so its hard to know what process to kill on the remote machine, and even if I... (2 Replies)
Hi All,
We have 2 servers A and B.
B is having a sctipt called b.sh in path /home/dev/scripts.
Now my requirement is i want to execute b.sh from server A.
Kindly help me. (3 Replies)
Hi,
The below command is not giving me the count , Can somebody help me in re-writing this pls .
Proc_Exist=`ssh -q -o "BatchMode=yes" -o "PasswordAuthentication=no" $OAUSER@${Primary_Node} ps -ef |
grep -v grep | grep "${ICM_Proc}" |wc -l `
Also the same problem with below... (13 Replies)
I have a script in local server
cd /home/dell/work/BOP/testdir
./processchk po (here processchk is a script & po is passed as an argument)
Now I want to execute this script from remote server
ssh $username@$hostname "cd /home/dell/work/BOP/testdir; ./processchk po"
But Its getting error... (9 Replies)
Discussion started by: manohar2013
9 Replies
LEARN ABOUT DEBIAN
ttyrec
TTYREC(1) General Commands Manual TTYREC(1)NAME
ttyrec - a tty recorder
SYNOPSIS
ttyrec [-a] [-u] [-e command] [file]
DESCRIPTION
Ttyrec is a tty recorder. It is a derivative of script(1) command for recording timing information with microsecond accuracy as well. It
can record emacs -nw, vi, lynx, or any programs running on tty.
Ttyrec invokes a shell and records the session until the shell exits. Recorded data can be played back with ttyplay(1). If the argument
file is given, the session will be recorded in that file. Otherwise, ttyrecord is used as default.
OPTIONS -a Append the output to file or ttyrecord, rather than overwriting it.
-u With this option, ttyrec automatically calls uudecode(1) and saves its output when uuencoded data appear on the session. It allow
you to transfer files from remote host. You can call ttyrec with this option, login to the remote host and invoke uuencode(1) on it
for the file you want to transfer.
-e command
Invoke command when ttyrec starts.
ENVIRONMENT
SHELL If the variable SHELL exists, the shell forked by ttyrec will be that shell. If it's not set, the Bourne shell is assumed. (Most
shells set this variable automatically).
SEE ALSO script(1), ttyplay(1), ttytime(1), uuencode(1), uudecode(1)TTYREC(1)