need a script that does a simple task on multiple unix servers.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need a script that does a simple task on multiple unix servers.
# 1  
Old 02-10-2012
need a script that does a simple task on multiple unix servers.

hi guys,
i need a script that does a simple task on multiple aix servers.
if possible with both telnet and ssh.
the simple task i wanna do is connect to a server and run "ifconfig -a" and get the output. nextweek i need to do similar jobs on like 50 servers... Smilie
can anybody help me with making this script plz?
# 2  
Old 02-11-2012
hi curtis,

there are many past threads on unix.com regarding a nedd similar to yours;
you may have a look at the following past threads for the structure of some expect script that may be useful for your task:
https://www.unix.com/shell-programmin...cant-stop.html
https://www.unix.com/shell-programmin...sh-script.html

to send the output of a command from expect to a log file, have also a look at:
expect log file - The Tcl programming language

see ya
fra
This User Gave Thanks to frappa For This Post:
# 3  
Old 02-12-2012
thnx a lot fra!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run simple single command on multiple Linux servers?

Hi All, How can i run a single command on multiple servers with or without giving credentials. I have a file(servers.txt) which has got list of servers and i want to run a command lsb_release -dr on all these servers and get output of those servers against each server. I tried below code... (9 Replies)
Discussion started by: darling
9 Replies

2. Homework & Coursework Questions

Parallel execution on multiple servers in UNIX

I have a requirement (in a shell script) to connect to several servers at once and execute a series of commands. I am aware that ssh can be used for sequential execution. But since most of the commands that I need to execute take a long time, I have to go for the parallel option. Is there... (2 Replies)
Discussion started by: sneha1887
2 Replies

3. Shell Programming and Scripting

Can Anyone help me..to do my task in simple way..

Hi... I am trying extract data using 2 files.. 1. Data file - DATA.TXT containing data to be extracted 2. Column file - LIST.TXT header column to be extracted output not coming properly.. if the header field name matches with data file header extract data...this actually I wanted ... ... (7 Replies)
Discussion started by: nex_asp
7 Replies

4. Shell Programming and Scripting

simple aggregate task

Hi experts, I need an help on the task below. INPUT: values separated by the tab,first row is the header 20110609 AS A 300.5000 20110609 AS R 200.5000 20110609 BR A 111.5000 20110609 BR R 222.5000 20110610 AS A 100.5500 20110610 AS ... (2 Replies)
Discussion started by: hernand
2 Replies

5. Shell Programming and Scripting

how to call unix script in informatoca thrgh cmd task

how to call unix script in informatoca thrgh cmd task (0 Replies)
Discussion started by: sunilamarnadh
0 Replies

6. UNIX for Advanced & Expert Users

grep for a line in a file on multiple unix servers

Hi, I need to grep(look) for a line in filename named /tmp/Test on all 90 unix servers. Without logging to each servers manually and grep'ing for the line, is there a way to pull this info in output file thru' the ksh/sh/bash script. Can someone pl. help to create this script for me? Ex.... (3 Replies)
Discussion started by: Mike1234
3 Replies

7. UNIX for Advanced & Expert Users

Script that can Automate Printer adding task in HP-UX servers

I want to make a script to automate printer adding task.My inputs are like Printer name : xyz Port number :9001 I should write a script to make the Printer adding task will be automated. Like in manually adding task we are doing through hppi or jetadmin tools. ---------- Post updated at... (2 Replies)
Discussion started by: AnilKPatnaik
2 Replies

8. Shell Programming and Scripting

Simple renaming task?

Hi guys, could someone tell me how i could create a label like this: mybox01, mybox04, mybox12, mybox10 when i have the values "mybox1", "mybox4","mybox12","mybox10" as a prefix and a number. If the number is below 10 then add a zero before the number? A one liner? A long approach is to... (2 Replies)
Discussion started by: muay_tb
2 Replies

9. Shell Programming and Scripting

Plink connections to multiple unix servers

Hi, I have a simple windows batch file which connects to a UNIX server and runs a shell script in my home directory on the server. It works perfectly, using plink + ssh keys in the background. What I plan to do is expand this batch file to connect to multiple servers and execute one script... (2 Replies)
Discussion started by: Moxy
2 Replies

10. Shell Programming and Scripting

comment and Uncomment single task out of multiple task

I have a file contains TASK gsnmpproxy { CommandLine = $SMCHOME/bin/gsnmpProxy.exe } TASK gsnmpdbgui { CommandLine = $SMCHOME/bin/gsnmpdbgui.exe I would like to comment and than uncomment specific task eg TASK gsnmpproxy Pls suggest how to do in shell script (9 Replies)
Discussion started by: madhusmita
9 Replies
Login or Register to Ask a Question