If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Need help to change the content for remote located file

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-08-09, 09:00
tmarjuna tmarjuna is offline
Registered User
 
Join Date: Jul 2009
Posts: 1
Smile Need help to change the content for remote located file

Hi All,

I have a file that sits on 4 diffrent servers, those servers are diffrent region based and they are authentication protected and that file has a diff port numbers, so when run the script it must ask my login details,region of server and port no for that file once it took from me it will goes to the file path where it will locate and open it change the content if i give the line whoes start with defualt or some perticuler word like care then it should search the file,once it found it should change the line if it is not found it must create a new line in the same file.So can you please help me how to write a script.your help is great appreciate.

Thank you in advance.

regards
Arjun
Reply With Quote
  #2 (permalink)  
Old 07-08-09, 09:13
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,517
Quote:
Originally Posted by tmarjuna
I have a file that sits on 4 diffrent servers, those servers are diffrent region based and they are authentication protected and that file has a diff port numbers, so when run the script it must ask my login details,region of server and port no for that file once it took from me it will goes to the file path where it will locate and open it change the content if i give the line whoes start with defualt or some perticuler word like care then it should search the file,once it found it should change the line if it is not found it must create a new line in the same file.So can you please help me how to write a script.your help is great appreciate.
Could you always make changes to one file and then FTP it to the other servers? Even better why not have just one file and get the other servers to grab the data from this one file rather than updating 4 separate files. If the data is record based then could you store the data in a database? I know quite a good forum regards databases.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On