Sponsored Content
Top Forums Shell Programming and Scripting how can I write script that lets me run shell commands? Post 302068804 by vino on Tuesday 21st of March 2006 04:47:07 AM
Old 03-21-2006
This has worked for me. Not sure about its elegance.

When you are in vi, issue an Ctrl z. That will make vi go into the background. When you want to go back to the vi session, issue a fg.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

Hi , I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell. So scenario is that - I need to have one shell script which is ran as a part of crontab - in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies

2. Shell Programming and Scripting

shell script to run a few commands help!

Hi friends this is first post i am very new to shell scripting so i require your expertise to do the following thank u I need to write a shell script which will run the following commands pg_dump bank > backup(Enter) Wait for bash prompt to appear coz it indicates that the command is... (23 Replies)
Discussion started by: perk_bud
23 Replies

3. Red Hat

how to write shell specific commands?

I am using Fedora 8,Red hat 9. Whenever we write a new command. Then we goto "/usr/bin" and then place this in this directory.And hence we can use it as a command anywhere from the terminal. We generally see commands like "trap" which run only in bash shell.We also have other shell specific... (1 Reply)
Discussion started by: nsharath
1 Replies

4. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies

5. Shell Programming and Scripting

Help with shell script to run the commands reading options from local file

I have to use shell script to run series of commands on another unix box by connecting through SSH and giving user credentials. For running commands on remote machine I have to use options reading from a local file. Process: Connecting to remote unix server <host1.ibm.com> through ssh Login: ... (2 Replies)
Discussion started by: itsprout
2 Replies

6. Shell Programming and Scripting

Run multiple commands in $() without opening a new shell

The code below works, but takes too many lines and looks awkward: db2 "export to $filename of del select * from $table with ur"|tee -a $LOGFILE|awk '/Number of rows exported:/ {print $5}' > numrows.tmp numrows=$(cat numrows.tmp) rm numrows.tmp When I try the... (2 Replies)
Discussion started by: akar_naveen
2 Replies

7. Shell Programming and Scripting

[bash] run a shell who runs commands

Hi all. On X11 I'm on a shell ...shell_1 (/bin/bash). From here I want to open another shell window shell_2 who executes commands like "ls -l" or programs like ". /program"... so the "result" of commands shows in shell_2 window and not in shell_1. Is that possible ? (4 Replies)
Discussion started by: jerold
4 Replies

8. Shell Programming and Scripting

shell script to run commands in different terminals

hi, how to write shell script that runs different commands(like:ls,ps,ls-l) in differnt terminals(each command should run in different terminal). my main motive is to run different 'c' program exe's available in different locations in different terminals. thanks sai (2 Replies)
Discussion started by: saidopdf
2 Replies

9. UNIX for Dummies Questions & Answers

Commands to run from shell script

Hi script> isumid 98765432 if i give above command in cmd prompt it is running the same thing if i give inside the shell script it is not working below is the code #!/bin/bash isumid 98765432 please give me a solution (16 Replies)
Discussion started by: Ramrangasamy
16 Replies

10. UNIX for Dummies Questions & Answers

How to write a shell script to Run it the from Date A to Date B?

Hi , How would i write a shell script to run the code from one date to another date EXample 2014-01-01 to 2014-02-28, can i any provide some clue on this (4 Replies)
Discussion started by: vikatakavi
4 Replies
rlogind(8)						      System Manager's Manual							rlogind(8)

NAME
rlogind - The remote login server SYNOPSIS
rlogind [-aln] FLAGS
Requests the addresses for the hostname, verifying that the name and address correspond. Normal authentication is bypassed if the address verification fails. Prevents authentication based on the user's $HOME/.rhosts file, unless the user is logging in as the superuser. Dis- ables transport-level, keep-alive messages. The messages are enabled by default. DESCRIPTION
The rlogind daemon is the server for the rlogin(1) program. The server provides a remote login facility with authentication based on priv- ileged port numbers from trusted hosts. The rlogind daemon listens for service requests at the port indicated in the login service specification; see services(4). When a service request is received, the following protocol is initiated: The server checks the client's source port. If the port is not in the range 512 to 1023, the server aborts the connection. The server checks the client's source address and requests the corresponding hostname (see gethostbyaddr(3), hosts(4) and named(8). If the hostname cannot be determined, the dot-notation representation of the host address is used. If the hostname is in the same domain as the server (according to the last two components of the domain name), or if the -a flag is given, the addresses for the hostname are requested, verifying that the name and address correspond. Normal authentication is bypassed if the address verification fails. Once the source port and address have been checked, rlogind proceeds with the authentication process described in rshd(8). It then allo- cates a pseudoterminal (see pty(7)), and manipulates file descriptors so that the slave half of the pseudoterminal becomes the stdin, std- out, and stderr for a login process. The login process is an instance of the login(1) program invoked with the -f option if authentication has succeeded. If automatic authentication fails, the user is prompted to log in as if on a standard terminal line. The -l option pre- vents any authentication based on the user's .rhosts file, unless the user is logging in as the superuser. By default, the rlogind daemon starts the login dialog using the login string specified in the message field of the /etc/gettydefs file. If you want to use a customized banner, create an /etc/issue.net or /etc/issue file. The rlogind daemon reads the file that exists and writes its contents to stdout prior to starting the login dialog. If both files exist, only the /etc/issue.net file is used. The parent of the login process manipulates the master side of the pseudoterminal, operating as an intermediary between the login process and the client instance of the rlogin program. In normal operation, the packet protocol described in pty(7) is invoked to provide <Ctrl- s>/<Ctrl-q> type facilities and propagate interrupt signals to the remote programs. The login process propagates the client terminal's baud rate and terminal type, as found in the TERM environment variable. The screen or window size of the terminal is requested from the client, and window size changes from the client are propagated to the pseudoterminal. Transport-level, keep-alive messages are enabled unless the -n flag is present. The use of keep-alive messages allows sessions to be timed out if the client crashes or becomes unreachable. Note that the authentication procedure used here assumes the integrity of each client machine and the connecting medium. This is insecure, but is useful in an open environment. DIAGNOSTICS
All initial diagnostic messages are indicated by a leading byte with a value of 1 (one), after which any network connections are closed. If there are no errors before login is invoked, a null byte is returned as an indication of success. A fork by the server failed. FILES
Specifies the command path RELATED INFORMATION
Commands: login(1). Daemons: rshd(8). Files: issue(4), issue.net. Functions: ruserok(3). delim off rlogind(8)
All times are GMT -4. The time now is 01:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy