How to Read File multi server from 1 server.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to Read File multi server from 1 server.
# 1  
Old 06-01-2011
How to Read File multi server from 1 server.

How to Read File multi server from 1 server. With Shell script.

Server1 (is host)

Server2
Server3
Server4

All server : user & password same.
: Path of file it same.
: user command grep "123456" filename*.log

Gide line Pls.
# 2  
Old 06-01-2011
Code:
for server in Server1 Server2 Server3 Server4
do
  ssh user@$server grep "123456" filename*.log
done

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multi server access through remote server using ssh

Team, Presently I have 5 ip address kept in ip_abc1 file, for each of the ip address listed, i need to login on each ipaddress one at a time and login as below for that specific ip address ssh -p 8101 karaf@<ip.address_for the specific ip address as logged in> password features:list... (4 Replies)
Discussion started by: whizkidash
4 Replies

2. UNIX for Dummies Questions & Answers

Transfer file from server B to server C and running the script on server A

I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A. Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server). We dont have RSA key... (4 Replies)
Discussion started by: kiran_j
4 Replies

3. Shell Programming and Scripting

Script to take .xls file and read it for each server

Script to take .xls file and read it for each server "/aix/test/$server_pre.xls" and then removes all the disks as provided in the file and then give output as below for each server, but am getting error where it says cannot find directory. server_name: server1 Disk Cleaned hdisk1 hdisk1... (2 Replies)
Discussion started by: aix_admin_007
2 Replies

4. Shell Programming and Scripting

Shell script to read from a file and update remote server

Its a tough one and would appreciate any guidance for a script that i am trying to develop....Again I do understand its a complicated script and help would be greatly appreciated.... Thank you 1- Need to check for a file (in a certain location on a server) every 15 minute or so if it is there... (4 Replies)
Discussion started by: aavam
4 Replies

5. Ubuntu

Any way we can create an SMTP server and use any scripting language to read emails from that server

Is there any way to create an SMTP mail server will all granular permissions to it so that I can read emails which that server receives through any scripting language and also reply from the same server automatically? (3 Replies)
Discussion started by: sandeepcm
3 Replies

6. IP Networking

How to create a multi-chat server using UDP?

Hifriends I have a doubt . how to create a multi-chat server using UDP which can run on MAC systems.. Thank u in advance (3 Replies)
Discussion started by: babbu25
3 Replies

7. IP Networking

routing to two subnets from a multi-homed server

We have two subnets, say 'domA' (192.168.0.0/24) and 'domB' (10.10.0.0/16). These subnets are connected through the router 'router01'. One server 'base01' has two network cards, configured to domA and domB subnets respectively. Now let's consider a host host01.domA (192.168.0.5) trying to... (0 Replies)
Discussion started by: amriksk
0 Replies

8. IP Networking

DHCP Server on Vxworks multi interface question

Hi, We currently operate a DHCP Server on Vxworks system. It seems that the server is functioning only over the boot interface. While trying to use it on a different interface the DHCP client messages seems to reach the interface but stay without response. From a... (1 Reply)
Discussion started by: zohara
1 Replies

9. IP Networking

Multi-client echo server

Hello I am currently learning how to program a multi-client server. I still have some code to configure, however I think I am fairly near to the end. My main problem is that whenever I connect with one client and receive an echo, do the same with another client and receive an echo, then try... (0 Replies)
Discussion started by: slanj
0 Replies

10. Programming

multi-threaded server, pthreads, sleep

I am trying to writa a multi-client & multi-threaded TCP server. There is a thread pool. Each thread in the pool will handle requests of multiple clients. But here I have a problem. I find a solution but it is not how it must be... i think. When threads working without sleep(1) I can't... (0 Replies)
Discussion started by: Parahat Melayev
0 Replies
Login or Register to Ask a Question