12-07-2010
replace information in a file
I need to change the ntp server on 100 Unix servers and want to script it out. How do I replace data in a file? What I want is to change what is in bold
server ntpserver_old prefer
to this
server new_ntpservername prefer
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Basically i have done created the script below, and it functions ok, it prints the access rights the user has. But i need it to print the group permissions, and other permissions, it would also be helpful if i could print the permissions in numeric form aswell, if it is possible. I have looked in... (50 Replies)
Discussion started by: Makaveli.2003
50 Replies
2. UNIX for Dummies Questions & Answers
I have a file which is of the format :-
/Ixxxxxx/WORK/HANDOFF;/xxxxxx/WORK/MB_BACKUP;<servername>;<dest-servername>;\\\\CAICMESF002DATA_GRP\OPERATIONS\IBBSSPOOLS\HANDOFF\;ACHOFF*;achoff;binary;3;1;|ACHOFF.zip;0;1;0;
I want to grep all capital and small OFF pattern in a format :-
... (2 Replies)
Discussion started by: kamlesh_k
2 Replies
3. Shell Programming and Scripting
Hi
i have a single line xml file having many account no tag, from which i need only the account no from the tag. any one can help on this.
below is the xml file:
... (2 Replies)
Discussion started by: Saravanapk
2 Replies
4. Shell Programming and Scripting
Hello, I'm new to scripting and I need help moving text from one file to another file. Here are examples what the files look like.
File 1:
Ac-223 2.10m A 1 0 0 0 Fr-219 358 9.9000E-01 0 0.0 0 0.0 0 0.0... (1 Reply)
Discussion started by: tamachan414
1 Replies
5. Shell Programming and Scripting
Hi to all,
I got this content/pattern from file http.log.20110808.gz
mail1 httpd: Account Notice: close igchung@abc.com 2011/8/7 7:37:36 0:00:03 0 0 1
mail1 httpd: Account Information: login sastria9@abc.com proxy sid=gFp4DLm5HnU
mail1 httpd: Account Notice: close sastria9@abc.com... (16 Replies)
Discussion started by: Mr_47
16 Replies
6. Shell Programming and Scripting
Hi
I am trying to extract information out of a file but keep getting grep cant open errors
the code is below:
#bash
#extract orders with blank address details
#
# obtain the current date
# set today to the current date ccyymmdd format
today=`date +%c%m%d | cut -c24-31`
echo... (8 Replies)
Discussion started by: Bruble
8 Replies
7. UNIX for Dummies Questions & Answers
I have a flat file that looks like this, let's call it Chromosome_9.txt:
FT /Gene_Name="Guanyl-Acetylase 9"
FT /Gene_Number"36952"
FT /Gene_Name="Endoplasmic Luciferase"
FT /Gene_Number"36953"
FT ... (4 Replies)
Discussion started by: Twinklefingers
4 Replies
8. Shell Programming and Scripting
hi, i have a large file containing the detailed information of a bunch of keys like this:
JAT_0001 contig102_342_3_n2 contig102_342 atgcacgacta 30 50 20... (11 Replies)
Discussion started by: the_simpsons
11 Replies
9. Shell Programming and Scripting
Hi Gurus,
I am SQL developer and new unix user.
I need to create some file and file content based on information in two files.
I have one file contains basic information below file1 and another exception file file2. the rule is if "zone' and "cd" in file1 exists in file2, then file name is... (13 Replies)
Discussion started by: Torhong
13 Replies
10. UNIX for Beginners Questions & Answers
I'm having few question.
i'm have a input file.
Other information
CONNECTIONS
"BP-COLLECTOR"
J6.4
"BP-TEST".4;
+5VS
C34.1
U21.1;
DEV_I2C_SDA
J6.6
R4.1
U18.1;
DEVICES
"BP-TEST"
1."BP-LED_ANODE" (8 Replies)
Discussion started by: kttan
8 Replies
LEARN ABOUT SUSE
ntptrace
ntptrace(1) General Commands Manual ntptrace(1)
NAME
ntptrace - trace a chain of NTP servers back to the primary source
SYNOPSIS
ntptrace [ -vdn ] [ -r retries ] [ -t timeout ] [ server ]
DESCRIPTION
ntptrace determines where a given Network Time Protocol (NTP) server gets its time from, and follows the chain of NTP servers back to
their master time source. If given no arguments, it starts with localhost . Here is an example of the output from ntptrace :
% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135 server2ozo.com: stratum 2, offset 0.0124263, synch distance
0.115784 usndh.edu: stratum 1, offset 0.0019298, synch distance 0.011993, refid On each line, the fields are (left to right): the host
name, the host stratum, the time offset between that host and the local host (as measured by ntptrace ; this is why it is not always zero
for " localhost "), the host synchronization distance, and (only for stratum-1 servers) the reference clock ID. All times are given in sec-
onds. Note that the stratum is the server hop count to the primary source, while the synchronization distance is the estimated error rela-
tive to the primary source. These terms are precisely defined in RFC-1305.
OPTIONS
-d Turns on some debugging output.
-n Turns off the printing of host names; instead, host IP addresses are given. This may be useful if a nameserver is down.
-r retries Sets the number of retransmission attempts for each host (default = 5).
-t timeout Sets the retransmission timeout (in seconds) (default = 2).
-v Prints verbose information about the NTP servers.
BUGS
This program makes no attempt to improve accuracy by doing multiple samples.
SEE ALSO
More documentation is available in the package ntp-doc.
AUTHOR
David L. Mills <mills@udel.edu>
ntp 4.1.1b-r5 ntptrace(1)