Editing a file on remote server using shell script locally


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Editing a file on remote server using shell script locally
# 1  
Old 08-14-2013
Editing a file on remote server using shell script locally

Hi All,

I have below requirements for my project:

1. Building a shell script which connects to a remote server
2. running script on local machine as user 'A'
3. connecting to server using user 'B' with password
4. login with a powerbroker role 'P' (asks for same password as 'B') on that server
5. edit a file and save it
6. Exit from server
# 2  
Old 08-14-2013
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To run a shell script in remote server from windows batch file

Hi all, i need to run a shell script on remote server. I have created file .bat file in windows server with following code, c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh i need to run the script.sh in my remote server Above command is not working, any... (4 Replies)
Discussion started by: rammm
4 Replies

2. Shell Programming and Scripting

Editing a file on remote server using shell script locally

Hi Scott, My previous post was not for any school or college projects. I am currently working with a IT company (Cannot provide more details than this). I am trying to implement the below script in my day-to-day work, Apologies for the confusion in previous post :). My question remains same... (4 Replies)
Discussion started by: Nishant Ladiwal
4 Replies

3. Shell Programming and Scripting

Shell quoting problem while editing a remote file using sed

value of i = solarisbox ssh $i "cat /etc/hosts | sed "s/$i\.local\.//" | sed "s/$i\./$i/" | sed "s/$i/$i.sol.com/" > /usr/users/chidori/edit_hosts"While running the above one liner its i am not able to make the changes and write it to the file /usr/users/chidori/edit_hosts . I know there is a... (2 Replies)
Discussion started by: chidori
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. Shell Programming and Scripting

Reading file from remote system and work on it locally

Hi! I am still fairly new to shell programming, but I have taken an interest to it and want to try some new stuff. I intend to make a shell script (using bash) to read a file on a remote system, then do some work on it on the local system and display it. In the long run I want to have a... (9 Replies)
Discussion started by: aaOzymandias
9 Replies

6. Shell Programming and Scripting

How to FTP the latest file, based on date, from a remote server through a shell script?

How to FTP the latest file, based on date, from a remote server through a shell script? I have four files to be FTP'ed from remote server. They are of the following format. build1_runtime_mmddyyyy.txt build2_runtime_mmddyyyy.txt build3_runtime_mmddyyyy.txt buifile_count_mmddyyyy.txt ... (9 Replies)
Discussion started by: imran_affu
9 Replies

7. Shell Programming and Scripting

Use cURL in shell script and get most recent file from remote server using SFTP

I have been trying to implement the following shell script -- sftp to remote server get list of files in the directory sftp get the most recent listed file exit This script will be scheduled to be executed everyday using CRON or CONTROL-M and the need is to have absolutely no human... (7 Replies)
Discussion started by: toobrown1
7 Replies

8. Shell Programming and Scripting

editing a file using shell script

HI all, I have file in the below format 1111111111_222222222_3333333 111111_22222_33333 11111111_222222_33333333333 i need to display this file like this 2222222_1111111111 22222_11111111 22222222222_1111111111111 can anyone help me with this Thanks in advance (1 Reply)
Discussion started by: saravanan71184
1 Replies

9. UNIX for Dummies Questions & Answers

Pull a file from a remote server through a shell script

Hi, I am writing a shell script to pull a file from a remote server (Let say its a windows based remote server). One of my criteria is to pull a file only if it is not empty. We have done a similar script to push a file from our end to a remote server and before pushing it we check for the... (2 Replies)
Discussion started by: sashankkrk
2 Replies

10. UNIX for Dummies Questions & Answers

Editing a file in a shell script

Using Solaris 8. I need to create a shell script that will edit a text file. I need to look in the text file and do a search and replace. For instance, the text file name is always 'filename'. I need to open filename and replace every instance of 'oldtext' with 'newtext'. 'oldtext' is static. ... (3 Replies)
Discussion started by: jowpup
3 Replies
Login or Register to Ask a Question