login into multiple servers through script is having some problem
Hi Everybody,
I am bit new to shell scripting. I need some help in my script.
I have to login into 15 servers and check some logs daily. For that I've written one shell script, somewhere it is having some problems. After log into the first server, the script is not going with the next steps. As I'm trying to run the script from my home directory, I guess, I don't need to provide any password to login to that server, and it's also not asking any passwds. I'm not getting what is wrong in the script? The script is attached to this post. Can anyone please help on this please?
I need to login into multiple servers thru a script run couple commands and run find command as root. I only have ssh access to the servers as a user than I can "su" to root. If you have a similar script please post it. Also if you can suggest commands that I should consider please let me know.
... (1 Reply)
Hi,
I want to write a shell script to compare two tables in teradata.these tables are present on different servers.
I want to connect to both servers in single login in order to fetch and compare the data in one go.
Thanks (1 Reply)
I have the following block from a script (it's not the entire script, but I'm confident it's all that is pertinent)
echo "$SESSIONS"|while read ID;do
ASSETID=$(echo "$ERRORS"|grep -i "$ID"|grep FX_Media_Session_Playlist::init_playlist|grep -i asset_id=|awk '{print $11}')
BLADE=$(echo... (2 Replies)
Hi ppl,
I am looking out for a shell script
a. That would have to login(from a main server) to say 16 servers individually.
b.On each server go to a particular location, check if a particular file is generated on a date(say every sunday it gets generated and i would be interested in the latest... (0 Replies)
Hi ppl,
I am looking out for a shell script
a. That would have to login(from a main server) to say 16 servers individually.
b.On each server go to a particular location, check if a particular file is generated on a date(say every sunday it gets generated and i would be interested in the latest... (1 Reply)
Hi ppl,
I am looking out for a shell script
a. That would have to login(from a main server) to say 16 servers individually.
b.On each server go to a particular location, check if a particular file is generated on a date(say every sunday it gets generated and i would be interested in the latest... (8 Replies)
I am having the 15 servers which need to do the monitoring
Hi I need a shell script, By which i can log in to multiple servers and execute the commands.. I need to specify the username and password in the scripts.
Please help me to write the script so that it can login with username and... (5 Replies)
Hi all,
I am baffled on this. Solaris Irix system.:confused:
I have 4 servers all connected to one another, :b: I need to write a script line that would login on to server 1-3 ($HOST) start a script in the back ground and log off while the back ground script runs over a length of time.:eek:
... (10 Replies)
I need to run a script on a bunch of remote servers. how can this be done without ssh into each individual server and run it
its under /sbin/script.sh on each server (1 Reply)
I need to manually interactively feed in my password for each server one after the other. Below is the script I am using:
#!/bin/bash
input="serverlist.txt"
while IFS= read -r var <&3
do
echo $var
ssh user1@$var
done 3< "$input"
I get password prompt for the first server. If I dont have... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT OSF1
script
script(1) General Commands Manual script(1)NAME
script - Makes a transcript of terminal session
SYNOPSIS
script [-a] [file]
The script command makes a transcript of everything printed on your terminal.
OPTIONS
Appends the transcript to file rather than writing it to file.
OPERANDS
The name of an output file that will contain the transcript of the session. If this parameter is omitted, the file typescript is written.
DESCRIPTION
The transcript is written to file, or appended to file if the -a option is given. If no file name is given, the transcript is saved in the
file typescript.
The script ends when the forked shell exits.
This program is useful when you are using a CRT and want a hard-copy record of the dialog (for example, a technical writer might create an
example of a working session this way).
If you specify the -a option and the file does not exist, it is created.
If you do not specify the -a option and the file exists, it is replaced.
RESTRICTIONS
The script command requires a streams based terminal. In single user mode, streams may not be enabled. Under these circumstances, script
will exit with no action. If you are the superuser and need to run this command in single user mode, use the following special instruc-
tions.
Enabling Streams
If it is necessary to enable a streams environment in the single user mode, enter the command /sbin/init.d/streams. This command is avail-
able to the superuser only.
SEE ALSO
Commands: autopush(8), cat(1), echo(1), strsetup(8), tee(1)
System Administration
script(1)