10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi - I want to add all columns if column1 name matches.
TOPIC1 5 1 4
TOPIC2 3 2 1
TOPIC3 7 2 5
TOPIC1 6 3 3
TOPIC2 4 1 3
TOPIC3 9 5 4
. . . .
. . . .
. . . .
Result should look like
TOPIC1 11 4 7
TOPIC2 7 3 4 (1 Reply)
Discussion started by: oraclermanpt
1 Replies
2. UNIX for Beginners Questions & Answers
Hi friends,
i want to compare first columns from two different files ,if equal print the file2's second column else print the zero.Please help me...
file1:
a
b
c
d
efile2:
a 1
c 20
e 30
desired output:
1
0
20
0
30
Please use CODE tags as required by forum rules!
Please post in... (1 Reply)
Discussion started by: bhaskar illa
1 Replies
3. UNIX for Beginners Questions & Answers
Hi,
I have to extract the whole set if a pattern matches.i have a file called input.txt
input.txt
------------
CREATE TABLE ABC
(
A,
B,
C
);
CREATE TABLE XYZ
(
X,
Y,
Z,
P,
Q
); (6 Replies)
Discussion started by: raju2016
6 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I have a problem that I'm struggling to resolve. I have two files that look like this:
File 1
654654654 3
987987987 2
321321321 1
File 2
14NS0064 654654654
14NS0054 654654654
14NS0032 654654654
14NS0090 987987987
14NS0093 987987987
14NS0056 321321321
As you may notice,... (2 Replies)
Discussion started by: winkleman
2 Replies
5. Shell Programming and Scripting
I sat down yesterday to write this script and have just realised that my methodology is broken........
In essense I have.....
----------------------------------------------------------------- (This line really is in the file)
Service ID: 12345 ... (7 Replies)
Discussion started by: Bashingaway
7 Replies
6. Shell Programming and Scripting
Hi to all,
I have two files. File1 has no header, two columns:
sample1 A
sample2 B
sample3 B
sample4 C
sample5 A
sample6 D
sample7 D
File2 has a header, except for the first 3 columns (chr,start,end). "sample1" is the header for the 4th ,5th ,6th columns, "sample2" is the header... (4 Replies)
Discussion started by: aec
4 Replies
7. Shell Programming and Scripting
I have two text files that look something like this:
A:B:C 123
D:E:F 234
G:H:I 345
J:K:L 123
M:N:O 456
P:Q:R 567
A:B:C 456
D:E:F 567
G:H:I 678
J:K:L 456
M:N:O 789
P:Q:R 890
I want to find the line where the first column matches and then combine the second columns into a single... (8 Replies)
Discussion started by: pbluescript
8 Replies
8. Shell Programming and Scripting
awk experts,
I have a big file of 4000 columns with header. Would like to print the columns with string value of "Commands" in header. File has "," separator. This file is on ESX host with Bash.
Thanks,
Arv (21 Replies)
Discussion started by: arv_cds
21 Replies
9. Shell Programming and Scripting
I am trying to join/paste columns from two files for the rows with matching first field. Any help will be appreciated.
Files can not be sorted and may not have all rows in both files.
Thanks.
File1
aaa 111
bbb 222
ccc 333
File2
aaa sss mmmm
ccc kkkk llll
ddd xxx yyy
Want to... (1 Reply)
Discussion started by: sk_sd
1 Replies
10. Shell Programming and Scripting
Hi All,
I have an input below. I tried to use the awk below but it seems that it ;s not working. Can anybody help ?
My concept here is to find the 2nd field of the last occurrence of such pattern " ** XXX ccc ccc cc cc ccc 2007 " . In this case, the 2nd field is " XXX ". With this "XXX" term... (20 Replies)
Discussion started by: Raynon
20 Replies