10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a file abc.csv, from which I need column 24(PurchaseOrder_TotalCost) to get the sum_of_amounts with date and row count into another file say output.csv
abc.csv-
UTF-8,,,,,,,,,,,,,,,,,,,,,,,,,
... (6 Replies)
Discussion started by: Tahir_M
6 Replies
2. Shell Programming and Scripting
What is an efficient way of counting the number of unique values in a 400 column by 1000 row array and outputting the counts per column, assuming the unique values in the array are:
A, B, C, D
In other words the output should look like: Value COL1 COL2 COL3
A 50 51 52... (16 Replies)
Discussion started by: Geneanalyst
16 Replies
3. Shell Programming and Scripting
Hi, I have tab-deliminated data similar to the following:
dot is-big 2
dot is-round 3
dot is-gray 4
cat is-big 3
hot in-summer 5
I want to count the frequency of each individual "unique" value in the 1st column. Thus, the desired output would be as follows:
dot 3
cat 1
hot 1
is... (5 Replies)
Discussion started by: owwow14
5 Replies
4. Shell Programming and Scripting
Hello friends,
I have a text file with many columns (no. columns vary from row to row) separated by space. I need to collect all the values from 18th column to the end from each line and group them as pairs and then numbering like below..
1. 18th-col-value 19th-col-value 2. 20th-col-value ... (5 Replies)
Discussion started by: prvnrk
5 Replies
5. Shell Programming and Scripting
Hi all, I need help.
I have an input text file (input.txt) like this:
21 GTGCAACACCGTCTTGAGAGG 50
21 GACCGAGACAGAATGAAAATC 73
21 CGGGTCTGTAGTAGCAAACGC 108
21 CGAAAAATGAACCCCTTTATC 220
21 CGTGATCCTGTTGAAGGGTCG 259
Now I need to count A/T/G/C numbers at each character location in column... (2 Replies)
Discussion started by: thienxho
2 Replies
6. Shell Programming and Scripting
Hi,
I need help to count the number of occurrences in $3 of file1.txt. I only know how to count by checking one by one and the code is like this:
awk '$3 ~ /aku hanya poyo/ {++c} END {print c}' FS="\t" file1.txt
But this is not wise to do as i have hundreds of different occurrences in that... (10 Replies)
Discussion started by: redse171
10 Replies
7. UNIX for Dummies Questions & Answers
Hi !
input:
A|B|C|D
A|F|C|E
A|B|I|C
A|T|I|B
As the title of the thread says, I would need to get:
1|3|2|4
I tried different variants of this command, but I don't manage to obtain what I need:
gawk 'BEGIN{FS=OFS="|"}{for(i=1; i<=NF; i++) a++} END {for (b in a) print b}' input
... (2 Replies)
Discussion started by: beca123456
2 Replies
8. UNIX for Dummies Questions & Answers
Hey everyone!
I have a tab delimited data set which I want to create an output contained the calculation of number of those lines with a certain value in 2nd and 3rd column.
my input file is like this:
ID1 1 10M AAATTTCCGG
ID2 5 4M ACGT
ID3 5 8M ACCTTGGA
ID4 5 ... (7 Replies)
Discussion started by: @man
7 Replies
9. Shell Programming and Scripting
Hi friends,
I have an input file of the following format
a b c 1.11112
d e f 4.5767
g h i 19.098
k i l 87.9999
I am looking for an awk one liners that would help me in giving the following output
output.txt
Range of the column: 1.11112 to 87.9999
Total records between 1 and 10 - 2... (5 Replies)
Discussion started by: jacobs.smith
5 Replies
10. UNIX for Dummies Questions & Answers
Could anybody help with this?
I have input below .....
david,39
david,39
emelie,40
clarissa,22
bob,42
bob,42
tim,32
bob,39
david,38
emelie,47
what i want to do is count how many names there are with different ages, so output would be like this ....
david,2
emelie,2
clarissa,1... (3 Replies)
Discussion started by: itsme999
3 Replies