10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Gents
Can you help please.
Input file
5490921425 1 7 1310342 54909214251
5490921425 2 1 1 54909214252
5491120937 1 1 3 54911209371
5491120937 3 1 1 54911209373
5491320785 1 ... (4 Replies)
Discussion started by: jiam912
4 Replies
2. Shell Programming and Scripting
Hi All,
I need to extract duplicate rows from a file and write these bad records into another file. And need to have a count of these bad records.
i have a command
awk '
{s++}
END {
for(i in s) {
if(s>1) {
print i
}
}
}' ${TMP_DUPE_RECS}>>${TMP_BAD_DATA_DUPE_RECS}... (5 Replies)
Discussion started by: Arun Mishra
5 Replies
3. Shell Programming and Scripting
I have two questions that are related, so it would be great if you can help me with both!
Question1:
I have a file A that looks like this:
a x
b y
b z
c w
I want to get something like:
a x
b y; z
c w
Given that a,b,c has no spaces. But the other letters might contain spaces.
... (2 Replies)
Discussion started by: Viernes
2 Replies
4. Shell Programming and Scripting
Hello guys,
I'm trying to extract all the expressions between the following tags: <b></b> from a HTML file.
This is how it looks: big lines containing several dozens expressions (made of 1,2,3,4,6 or even 7 words) I would like to extract:
<b>bla ble</b>bla ble</td><tr valign="top"><td... (3 Replies)
Discussion started by: bobylapointe
3 Replies
5. UNIX for Dummies Questions & Answers
I am trying to print columns from a table whose name (header) matches a certain string.
E.g.,
patient1001 patient1002 patient2005 patient3005 patient4001
0 0 0 0 0
2 9 2 8 3
2 7 3 0 2
Say I want to print columns whose names end with "01"
patient1001 patient4001
0 0
2 3
2 2
... (3 Replies)
Discussion started by: quextil
3 Replies
6. Shell Programming and Scripting
Hi! I have a file as below:
line1
line2
line2
line3
line3
line3
line4
line4
line4
line4
I would like to extract duplicate lines (not unique, triplicate or quadruplicate lines). Output will be as below:
line2
line2
I would appreciate if anyone can help. Thanks. (4 Replies)
Discussion started by: chromatin
4 Replies
7. Shell Programming and Scripting
I have searched the internet for duplicate row extracting.
All I have seen is extracting good rows or eliminating duplicate rows.
How do I extract duplicate rows from a flat file in unix.
I'm using Korn shell on HP Unix.
For.eg.
FlatFile.txt
========
123:456:678
123:456:678
123:456:876... (5 Replies)
Discussion started by: bobbygsk
5 Replies
8. Shell Programming and Scripting
Hi,
I'm trying to use sed to extract some text and assign it to a variable.
Can anyone provide me with some help? it would be much appreciated!
I"m looking to extract for example:
filename=/output/R34/2005_13_R34_C1042S_T83_CRFTXT_20081015.txt
I'm trying to extract the 1042... (9 Replies)
Discussion started by: jtung
9 Replies
9. Shell Programming and Scripting
I have a input file with formating:
6000000901 ;36200103 ;h3a01f496 ;
2000123605 ;36218982 ;heefa1328 ;
2000273132 ;36246985 ;h08c5cb71 ;
2000041207 ;36246985 ;heef75497 ;
Each fields is seperated by semi-comma. Sometime, the second files is... (6 Replies)
Discussion started by: anhtt
6 Replies
10. UNIX for Dummies Questions & Answers
All,
I have a task to search through several hundred files and extract duplicate detail records and keep them grouped with their header record. If no duplicate detail record exists, don't pull the header. For example, an input file could look like this:
input.txt
HA
D1
D2
D2
D3
D4
D4... (17 Replies)
Discussion started by: run_eim
17 Replies