Sponsored Content
Top Forums Shell Programming and Scripting scripting an interactive program session Post 302602508 by gary_w on Monday 27th of February 2012 02:22:24 PM
Old 02-27-2012
Have you tried a "here document"? To type control characters, first press CTRL-V then CTRL-D:

Code:
# oi $user <<EOF
message text
<CTRL-V><CTRL-D>
EOF

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making Interactive program

Hi Friends I am trying to make an interactive shell script ( I do not have expect tool ) My objective is 1.I have a progam named say "inter" The program when ran on command prompt will be as below Prompt>inter Please enter the choice 1.enter 1 2.enter 2 < I need to enter 1 or 2... (4 Replies)
Discussion started by: sivasenthil_k
4 Replies

2. Shell Programming and Scripting

Running an Interactive Program Remotely

now, i have a program that i would very much prefer to run remotely as i hate having to log into the box it is on. the problem is, every command i have tried to run this remotely doesn't work. the commands tries to kick off the program on the remote box but then hangs. like take for... (3 Replies)
Discussion started by: Terrible
3 Replies

3. Shell Programming and Scripting

scripting an ssh session?

I know the root login/password for a machines, and I want to automate some commands like this from each: ssh root@remoteHost1 "tail /var/log/messages" ssh root@remoteHost2 "tail /var/log/messages" ssh root@remoteHost3 "tail /var/log/messages" ssh root@remoteHost4 "tail /var/log/messages" ssh... (2 Replies)
Discussion started by: jjinno
2 Replies

4. Shell Programming and Scripting

Develop Program with 'None Interactive Flag'

Hi I have created a program but am currently wondering how to develop it further. I wanted to know how i would go about developing the program further so that it is able to run with a "none interactive flag" enabling execution to be automated with the resultant file e-mailed to a user once a week.... (1 Reply)
Discussion started by: warlock129
1 Replies

5. Shell Programming and Scripting

Non-interactive FTP within SSH session not working

Hello everyone! I am trying to log-in to a remote server over SSH, transfer file1 there, perform some checks, capture the results in file2 and transfer file2 back to my local server - all of this non-interactively. Initially, I tried to do this within a singe SSH session, using the following... (2 Replies)
Discussion started by: Subu1987
2 Replies

6. Shell Programming and Scripting

Expect command use for interactive mode of scripting

Hi All, I am writing a script(Auto_Installation.sh) which is calling one another script (./update_manager /spare/install/HO7/PME_Response_file.txt) Now the issue is result of (./update_manager /spare/install/HO7/PME_Response_file.txt) script is ##########################################... (6 Replies)
Discussion started by: Dhruvak
6 Replies

7. Programming

Run interactive program in background and grep it

I need to run an interactive program in the background so I can grep it for specific data to use for some logic in a script. There is no quiet or background mode on the program so I plan to redirect a document with commands in it and then to grep the output. This is almost working, except... (1 Reply)
Discussion started by: doonan_79
1 Replies

8. Shell Programming and Scripting

Unix scripting and screen session

hi, i am on AIX 5.3. I would like to write scripts that initiate or reattach to a screen session to run some commands either from unix or Universe. Can anyone assist me with a with a wuick primer on this. I can attach or initiate a screen manually and then run the commands but I would like to... (6 Replies)
Discussion started by: dustytina
6 Replies

9. Programming

Non-interactive login using C program in UNIX(Solaris)

Hi i need a c programm to login in unix(solaris). non-interactivley because it seems difficult to do it with unix shell scripting and passwd command cant be used and also i don't have expect installed and i am not allowed to installed expect in our servers. is there any c programm that can help... (1 Reply)
Discussion started by: munish259272
1 Replies

10. Shell Programming and Scripting

Passing arguments to interactive program through bash script, here document

Dear Users, I have installed a standalone program to do multiple sequence alignment which takes user parameters to run the program. I have multiple sequence files and want to automate this process through a bash script. I have tried to write a small bash code but its throwing errors. Kindly... (13 Replies)
Discussion started by: biochemist
13 Replies
rlogin(1c)																rlogin(1c)

Name
       rlogin - remote login

Syntax
       rlogin rhost [-ec] [-8] [-L] [-l username]
       rhost [-ec] [-8] [-L] [-l username]

Description
       The command connects your terminal on the current local host system, lhost, to the remote host system, rhost.

       Each  host  has	a  file  which contains a list of rhosts with which it shares account names.  The host names must be the standard names as
       described in When you use the command to login as the same user on an equivalent host, you do not need to specify a password.

       You can also have a private equivalence list in a file .rhosts in your login directory.	Each line in this file should  contain	the  rhost
       name and a username separated by a space, giving additional cases where logins without passwords are permitted.	If the originating user is
       not equivalent to the remote user, then the remote system prompts for a login and password as in

       To avoid security problems, the .rhosts file must be owned by either the remote user or root and it may not be a symbolic link.

       Your remote terminal type is the same as your local terminal type, which is specified  by  your	environment  TERM  variable.   Except  for
       delays,	all  echoing takes place at the remote site so the rlogin is transparent.  Flow control by and <CTRL/Q>, and flushing of input and
       output on interrupts are handled properly.  The optional argument -8 allows an eight-bit input data path at all times.	Otherwise,  parity
       bits are stripped except when the remote site's stop and start characters are other than and <CTRL/Q>.  A tilde followed by a dot (~.) on a
       separate line disconnects from the remote host, where the tilde (~) is the escape character.  Similarly, a tilde followed  by  <CTRL/Z>	(~
       <CTRL/Z>), where is the suspend character, suspends the rlogin session.

       Substitution  of  the  delayed-suspend  character,  which  is normally <CTRL/Y>, for the suspend character suspends the send portion of the
       rlogin, but allows output from the remote system.  A different escape character may be specified by the -e option.  There is no space sepa-
       rating this option flag and the argument character.

Options
       -8		   Allows an 8-bit input data path at all times.

       -ec		   Uses the specified character as the escape character.  If not specified, uses a tilde (~).

       -l username	   Logs you in as the specified user, not as your user login name.

       -L		   Runs session in litout mode.

Files
       /usr/hosts/*	   for rhost version of the command

See Also
       rsh(1c)

																	rlogin(1c)
All times are GMT -4. The time now is 01:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy