10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear Experts,
I have input file which is comma separated, has 4 columns like below,
BRAND,COUNTRY,MODEL,COUNT
NIKE,USA,DUMMY,5
NIKE,USA,ORIGINAL,10
PUMA,FRANCE,DUMMY,20
PUMA,FRANCE,ORIGINAL,15
ADIDAS,ITALY,DUMMY,50
ADIDAS,ITALY,ORIGINAL,50
SPIKE,CHINA,DUMMY,1O
And expected output add... (2 Replies)
Discussion started by: ricky1991
2 Replies
2. Shell Programming and Scripting
Input File:
2000 3
1998 2
1997 2
1994 1
1991 1
1989 1
1987 2
1986 2
1985 1
1984 1
.
.
10 277256
9 278274
8 282507
7 284837
6 287066
5 292967 (4 Replies)
Discussion started by: perl_beginner
4 Replies
3. Shell Programming and Scripting
input
A1 B1 A2 B2
0 0 1 1
1 0 0 1
0 1 1 0
1 1 1 1
Output
label A1 B1 A2 B2
A1 2 1 1 2
B1 1 2 2 1
A2 1 2 3 2
B2 2 1 2 3
Ex:
The number of times that A1 and B1 row values are both 1 should be printed as output.
The last row of A1 and B1 in the input match by having 1 in both... (4 Replies)
Discussion started by: quincyjones
4 Replies
4. Shell Programming and Scripting
HI All,
I'm embedding SQL query in Script which gives following output:
Assignee Group Total
ABC Group1 17
PQR Group2 5
PQR Group3 6
XYZ Group1 10
XYZ Group3 5
I have saved the above output in a file.
How do i sum up the contents of this output so as to get following output:
... (4 Replies)
Discussion started by: Khushbu
4 Replies
5. Shell Programming and Scripting
My File looks like:
"|" -> Field separator
A|B|C|100|1000
D|E|F|1|2
G|H|I|0|7
D|E|F|1|2
A|B|C|10|10000
G|H|I|0|7
A|B|C|1|100
D|E|F|1|2
I need to do a SUM on Col. 5 and Col.6 by grouping on Col 1,2 & 3
My expected output is:
A|B|C|111|11100 (2 Replies)
Discussion started by: machomaddy
2 Replies
6. Shell Programming and Scripting
Hi all, I know this sounds suspiciously like a homework course; but, it is not.
My goal is to take a file, and match my "ID" column to the "Date" column, if those conditions are true, add the total number of minutes worked and place it in this file, while not printing the original rows that I... (6 Replies)
Discussion started by: mtucker6784
6 Replies
7. Shell Programming and Scripting
Hi I have a matrix with n rows and m columns like below example. i want to extract all the pairs with values <200.
Input
A B C D
A 100 206 51 300
B 206 100 72 48
C 351 22 100 198
D 13 989 150 100
Output format
A,A:200
A,C:51
B,B:100... (2 Replies)
Discussion started by: anurupa777
2 Replies
8. Shell Programming and Scripting
Hi All,
I have a huge (and its really huge!) matrix about 400GB in size (2 million rows by 1.5 million columns) . I am trying to optimize its space by creating a sparse representation of it.
Miniature version of the matrix looks like this (matrix.mtx):
3.4543 65.7876 54.564
2.12344... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies
9. Shell Programming and Scripting
I have a huge matrix file which looks like this (example matrix):
1 2 3 5
4 5 6 7
7 6 8 9
1 2 4 2
7 6 5 1
3 2 1 9
As one can see, this matrix has 4 columns and 6 rows. But my original matrix has some 3 million rows and 6000 columns.
For example, on this matrix I can define my task as... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
10. Shell Programming and Scripting
hi
plz can any body giv ethe code to perform transpose matrix of agiven matrix in shell scripts program????? (1 Reply)
Discussion started by: chaitunanduri
1 Replies