Script to change the file at one go on different UNIX machines


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to change the file at one go on different UNIX machines
# 1  
Old 07-19-2013
Script to change the file at one go on different UNIX machines

Hi Folks ,

I have a query that is I have a server (unix machhine) to which I login thru winscp or putty , mostly I use putty and at a particular location there is one xml(abc.xml) while which I change , let say


Code:
1) I login to first unix box
       hostname   :- ccc74
       username   :-bbb
       passwd :-    ccc
       
       and the location on unix box machine is 
        /opt/app/al/servers/abc.xml

similiarly there are several unix box machines having hostnames...ccc75, ccc 75, ccc76 , ccc77 , ccc78 and at the same location there is abc.xml

Now please advise me any script , as rite now I login thru winscp and do the changes manually on each xml , please advise any scriptSmilie

---------- Post updated at 11:16 AM ---------- Previous update was at 10:11 AM ----------

Quote:
Originally Posted by tuntun27272727
Hi Folks ,

I have a query that is I have a server (unix machhine) to which I login thru winscp or putty , mostly I use putty and at a particular location there is one xml(abc.xml) while which I change , let say


Code:
1) I login to first unix box
       hostname   :- ccc74
       username   :-bbb
       passwd :-    ccc
       
       and the location on unix box machine is 
        /opt/app/al/servers/abc.xml

similiarly there are several unix box machines having hostnames...ccc75, ccc 75, ccc76 , ccc77 , ccc78 and at the same location there is abc.xml

Now please advise me any script , as rite now I login thru winscp and do the changes manually on each xml , please advise any scriptSmilie
Folks please adviseSmilie

Last edited by tuntun27272727; 07-19-2013 at 12:18 PM..
# 2  
Old 07-19-2013
First off, to login automatically you will need to set up keys. The same idea works with putty, though putty has its own program to generate keys.

Once that's arranged, how to automatically change the XML file depends on what's in it and what you want to change what to what.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to change password in UNIX

Hi Friends, Every morning i need to change the password, please advise how it can be automated. I am having pre planned password list for 4 months which can be used as input file for new passwords. Thanks (28 Replies)
Discussion started by: rajjev_saini123
28 Replies

2. HP-UX

Automatic script to change the UNIX Password

Hi, we have around 50 users and every month we need to change the password manually once its expire. do we have any script to change the password automatically. OS -HP-UX Thanks in advance.. (6 Replies)
Discussion started by: periyasamycse
6 Replies

3. Shell Programming and Scripting

How to change passwords for User accounts on multiple UNIX/Linux machines remotely?

Hello Experts, Need some direction on creating shell script for following environment: We have about 20 people in the team working as Oracle DBA's (sysdba's and appdba's). Total Servers which is a mix of Unix and Linux are 200. We do not have Root user access on any of the servers and... (3 Replies)
Discussion started by: sha2402
3 Replies

4. Red Hat

Change root on 80 machines

I have inherited an 80 machine cluster and need to change root on all of them. :confused: Any ideas on an automated way to do that? ---------- Post updated at 11:29 AM ---------- Previous update was at 11:15 AM ---------- Assuming a stronger password, would this be a reasonable method for... (4 Replies)
Discussion started by: rd42
4 Replies

5. Cybersecurity

How were UNIX machines taken over by SPAMMERS?

Hello, Three of our machines at work were sending out SPAM on the internet. 2 of them were so old I knew that the hackers just exploited the vulnerabilities in the old systems. The cause of concern is that one one of the machines is a new Centos 5.3 box.The only proof we have is that 4-6 emails... (3 Replies)
Discussion started by: mojoman
3 Replies

6. Shell Programming and Scripting

Unix script to change password

Hello Gurus I have little challenge which I do not know how to address it. I have unix account on many servers (let's say over 25). These accounts expire every 60 days. Is there scripts that I can run from my "local computer" and pass a new password to it where it would change it for me on all... (7 Replies)
Discussion started by: nimo
7 Replies

7. Shell Programming and Scripting

Change the Windows Batch script to UNIX shell script.

Hi, When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script... Script: REM :: File Name : Refresh_OTL.bat REM :: Parameters : %1 - Region REM :: : %2 - Cube Type REM ::... (5 Replies)
Discussion started by: tomailraj
5 Replies

8. UNIX for Dummies Questions & Answers

Unix script to do a global change

I want to write a script to go into a unix directory and recursively change all the instances of a word in every file in every directory and sub directory. Here's where I am now: I can execute find . -print | xargs grep "my_word" to recuresively return all the files with my_word in it. ... (7 Replies)
Discussion started by: progkcp
7 Replies

9. IP Networking

How can i simulate network problems between unix machines ?

Hello all i need to simulate method invocations between 2 machine ( using corba ) now i like to test the method invoke timeout from machine1 to machine2 for that i need to simulate network being busy , can it be done some how ? (2 Replies)
Discussion started by: umen
2 Replies

10. Shell Programming and Scripting

Script to change UNIX password

My shop has just ordained that all UNIX passwords expire after 45 days. We do NOT have a "single logon" facility, so I will need to logon to each of the servers (15+) I interact with and change my password by hand. I thought I could invoke passwd inside a ksh script as a Here document and... (12 Replies)
Discussion started by: kornshellmaven
12 Replies
Login or Register to Ask a Question