07-08-2009
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
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
All, I need to write an unix shell script which inserts some records into a file located in remote servers.
* Get the input from the user and insert according the first row. It should be in ascending order.
123451,XA,ABA
123452,XB,ABB
123453,XC,ABC
123455,XE,ABE
123456,XF,ABF
123458,XG,ABG... (2 Replies)
Discussion started by: techychap
2 Replies
2. UNIX for Advanced & Expert Users
Hi All,
I have one 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... (1 Reply)
Discussion started by: tmarjuna
1 Replies
3. Shell Programming and Scripting
Greetings.
So the question is basically the same as it's in the title.
I'd like to write a program that changes a file by rows. So to clarify it.
(i know i shouldn't use code,/code here but i would like to separate it)
So for example a text file looks like something like this:
Happy... (5 Replies)
Discussion started by: buddhist
5 Replies
4. Shell Programming and Scripting
I have a Transaction File coming into the system. In this file, in all records the relevant data is as follows-
Position 1:10 -> Transaction Code
Position 252:255 -> 4 digit business code
Now based on these 2 fields I have to alter value in Transaction code (Position 1:10)... (6 Replies)
Discussion started by: varunrbs
6 Replies
5. Linux
Good day to you all,
Just want to check here, i know when scping a file, size might change due to space issue. it might sound silly, but does file content get change too? if so, what kind of situation that might be? (1 Reply)
Discussion started by: ahtat99
1 Replies
6. Shell Programming and Scripting
ssh -q "server_name sudo echo 'dbagroup::1234' >> sudo /etc/group"if i execute the above code its not getting appended.
my requirement is to login to remote server and append dbagroup::1234 in /etc/group i am able to achieve this with tee -a command
want to know why its not working with >>... (5 Replies)
Discussion started by: chidori
5 Replies
7. IP Networking
So, is there way of automating this ?
My ultimate goal is to run some cmd script in windows and it should connect to a remote unix host and run a script x.sh located on the remote unix host.
I was wanting to achieve this by using WinSCP and Putty only. If possible let me know how and if not... (25 Replies)
Discussion started by: mohtashims
25 Replies
8. Shell Programming and Scripting
Hi,
i have a file input.txt
Continent North America
Country USA Capital Washington D.C.
Country Canada Capital Ottawa
Continent South America
Country Argentina Capital Buenos Aires
Country Brazil Capital Brasília
Coutry Colombia Capital Bogotá
and i want to get an output.txt
... (3 Replies)
Discussion started by: fastlane3000
3 Replies
9. Shell Programming and Scripting
Hi All,
can some one suggest me a tool to compare file ownership/permission and contents of files located at two different unix servers?
Thanks,
Pranav (1 Reply)
Discussion started by: Pranav Bhasker
1 Replies
10. Shell Programming and Scripting
Hello,
I would like to change the content of the file that has few blocks starts with 10 and ends with ";"
File1.txt
10 bonuses D
20 MATCHED
30 UPD COL
40 (SOL=30)
20 NOT MATCHED
30 INS COL
40 (SOL=30)
;
10 bonuses D
20 MATCHED
30 UPD COL
40... (5 Replies)
Discussion started by: Mannu2525
5 Replies
LEARN ABOUT MINIX
rlogind
RLOGIND(8) System Manager's Manual RLOGIND(8)
NAME
rlogind, in.rld - remote login server
SYNOPSIS
login stream tcp nowait root /usr/sbin/in.rld in.rld
tcpd login /usr/sbin/in.rld
DESCRIPTION
Rlogind is the server for the rlogin(1) program. The server provides a remote login facility with authentication based on privileged port
numbers from trusted hosts.
Rlogind listens for service requests at the port indicated in the ``login'' service specification; see services(5). When a service request
is received the following protocol is initiated:
1) The server checks the client's source port. If the port is not in the range 0-1023, the server aborts the connection.
2) The server checks the client's source address and requests the corresponding host name (see gethostbyaddr(3), hosts(5) and
named(8)). If the hostname cannot be determined, the dot-notation representation of the host address is used.
Once the source port and address have been checked, rlogind allocates a pseudo terminal (see tty(4)), and manipulates file descriptors so
that the slave half of the pseudo terminal becomes the stdin , stdout , and stderr for a login process. The login process is an instance
of the login(1) program, invoked with the -r option. The login process then proceeds with the authentication process as described in
rshd(8), but if automatic authentication fails, it reprompts the user to login as one finds on a standard terminal line.
The parent of the login process manipulates the master side of the pseduo terminal, operating as an intermediary between the login process
and the client instance of the rlogin program. In normal operation, the packet protocol described in tty(4) is invoked to provide ^S/^Q
type facilities and propagate interrupt signals to the remote programs. The login process propagates the client terminal's baud rate and
terminal type, as found in the environment variable, ``TERM''; see environ(7). The screen or window size of the terminal is requested from
the client, and window size changes from the client are propagated to the pseudo terminal.
SEE ALSO
rlogin(1).
DIAGNOSTICS
All diagnostic messages are returned on the connection associated with the stderr, after which any network connections are closed. An
error is indicated by a leading byte with a value of 1.
``Try again.''
A fork by the server failed.
``/bin/sh: ...''
The user's login shell could not be started.
BUGS
The authentication procedure used here assumes the integrity of each client machine and the connecting medium. This is insecure, but is
useful in an ``open'' environment.
A facility to allow all data exchanges to be encrypted should be present.
A more extensible protocol should be used.
4.2 Berkeley Distribution May 24, 1986 RLOGIND(8)