10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a text file like below. THe content of the text will vary.
Entire text file have four consecutive lines followed with blank line.
I want to delete the occurrence of the two consicutive lines in the text file. I don't have pattern to match and delete. Just i need to delete all... (5 Replies)
Discussion started by: RJSKR28
5 Replies
2. Shell Programming and Scripting
I have a file lake this
cat ex1.txt
</DISCOUNTS>
<B2B_SPECIFICATION elem="0">
<B2B_SPECIFICATION elem="0">
<DESCR>Netti 2 </DESCR>
<NUMBER>D02021507505</NUMBER>
</B2B_SPECIFICATION>
<B2B_SPECIFICATION elem="1">
<DESCR>Puhepaketti</DESCR>... (2 Replies)
Discussion started by: Dhoni
2 Replies
3. UNIX for Dummies Questions & Answers
I have a text file that is about 90,000 lines long. How would I delete lines 64-89, 152-177, 240-265, 328-353... etc? The sections I would like to delete are 26 lines long and the number of lines between the sections I would like to delete is 62 lines. Thanks very much in advance. (6 Replies)
Discussion started by: MDeBiasse
6 Replies
4. Shell Programming and Scripting
I would like to compare the values of 2nd column of consecutive lines of same file in such a way so that if the difference between first value and second value is more than 100 it should print complete line else ignore line.
Input File
==========
PDB 2500
RTDB 123
RTDB-EAGLE 122
VSCCP 2565... (4 Replies)
Discussion started by: manuswami
4 Replies
5. Shell Programming and Scripting
We have very large transaction logs that have transactions which start with a line that starts with 'Begin :' and ends with a line that starts with 'End :'. For most transactions there is valid data between those two lines.
I am trying to get rid of lines that look like this:
Begin :... (11 Replies)
Discussion started by: deneuve01
11 Replies
6. Shell Programming and Scripting
Hi guys
I am deleting a unique line from the file and also need to remove the line above it which is NOT unique and servers as a record separator. Here is an example:
#
101 803E 823F 8240
#
102 755f 4F2A 4F2B
#
290 747D 0926 0927
#
999 8123 813E ... (5 Replies)
Discussion started by: aoussenko
5 Replies
7. Shell Programming and Scripting
Hello
I have a file in following format:
IV 08:09:07
NM 08:12:01
IC 08:12:00
MN 08:14:20
NM 08:14:15
I need a script to compare time on each line with previous line and show the inconsecutive line. Ex.:
08:12:00
08:14:15
A better way... (6 Replies)
Discussion started by: vilibit
6 Replies
8. Shell Programming and Scripting
Hi ,
I'm looking for a way to merge two lines only for a given pattern / condition.
Input :
abcd/dad + -49.201 2.09 -49.5 34 ewrew rewtre *
fdsgfds/dsgf/sdfdsfasdd +
-4.30 0.62 -49.5 45 sdfdsf cvbbv *
sdfds/retret/asdsaddsa +
... (1 Reply)
Discussion started by: novice_man
1 Replies
9. Shell Programming and Scripting
Hi,
I have a file named Mani.txt. The contents are like this
cat Mani.txt
--------------------------------------------------------
Hi there how r u
My Name is Mani
Bye
------------------------------------------------------------
I want to cut the first and last lines from the file... (15 Replies)
Discussion started by: pathanjalireddy
15 Replies
10. Shell Programming and Scripting
HI All,
I want to cut 5 lines after a pattern using sed or awk. can any one tell me how to do it ? (2 Replies)
Discussion started by: raghin
2 Replies