10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
By using sed command, How to insert a new line before the last four lines of the file.
Old Line (8 Replies)
Discussion started by: wridler
2. Shell Programming and Scripting
I need to read a text file and insert a string every n lines, but also have the line counter restart when I come across a header string.
Line repeating working every 3 lines using code:
sed '0~3 s/$/\nINSERT/g' < INPUT/PATH/FILE_NAME.txt > OUTPUT/PATH/FILE_NAME.txt
I cannot seem to find... (1 Reply)
Discussion started by: Skonectthedots
3. Red Hat
I have two ntp servers in my cluster and I want all the nodes in my cluster to sync with either of the ntp servers or just one. Unfortunately it keep rotating the sync, between my ntp server 1, ntp server 2 and local. Is there anyway I can change the sync to avoid local?
# ntpq -p
... (3 Replies)
Discussion started by: pjeedu2247
4. Shell Programming and Scripting
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
B. Database Name
C.... (2 Replies)
Discussion started by: JolietJake
5. Shell Programming and Scripting
Hi, I have text file:
Address: "120_B_C; ksilskdj; lsudlfw"
Address: "65_D_F; wnmlsi;lsuod;,...."
Zip:90233I want to insert 2 new lines before the 'Address: ' line deriving value from this Address line value
The Address value in quotes... (1 Reply)
Discussion started by: ysrini
6. Shell Programming and Scripting
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
Discussion started by: deneuve01
7. Shell Programming and Scripting
I have following pattern in a file:
and I need to change something like the following
XXXX (6 Replies)
Discussion started by: jjnight
I wonder if its possible to setup NTP clients running HP-UX o.s. from a solaris 10 NTP server?
FR (3 Replies)
Discussion started by: fretagi
9. Shell Programming and Scripting
I am trying to write a script that will count the number of characters for each line in a file and all the lines that have less than 80 characters and that are ending with a period, I want it to insert a blank line after them immediately. But, for whatever reason the condition if ]] is... (3 Replies)
Discussion started by: Pouchie1
10. Red Hat
I've got two suites. Both suites have servers with a ntp.conf and step-tickers file. Both suites are running fine with respect to time. One suite of servers has empty step-ticker files, the other one has content in the files.
Do I need both files? Should the files be populated? Should the two... (1 Reply)
Discussion started by: scottwevans