10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks,
I've got a csv file called test.csv
Column A Column B
Apples 1900
Apples 1901
Pears 1902
Pears 1903I want to count and keep duplicates in the first column. Desired output
Column A Column B Column C
Apples 2 1900
Apples ... (5 Replies)
Discussion started by: pshields1984
5 Replies
2. Shell Programming and Scripting
Hi all,
I have found another post threads talking about count duplicate lines, but I am interested in obtain the total number of duplicates. For example:
#file.txt
a1
a2
a1
a3
a1
a2
a4
a5
#out
3 (lines are duplicates)
Thank you! (12 Replies)
Discussion started by: mikloz
12 Replies
3. UNIX for Dummies Questions & Answers
I have been using grep to output whole lines using a pattern file with identifiers (fileA):
fig|562.2322.peg.1
fig|562.2322.peg.3
fig|562.2322.peg.3
fig|562.2322.peg.3
fig|562.2322.peg.7
From fileB with corresponding identifiers in the second column:
NODE_0 fig|562.2322.peg.1 peg ... (2 Replies)
Discussion started by: Mauve
2 Replies
4. Shell Programming and Scripting
got a file as y.txt
1 abc,def,ghj
2 defj,abc.kdm,ijk
3 lmn,cbk,mno
4 tmp,tmop,abc,pkl
5 pri,chk,cbk,lmo
6 def,cbk.pro,abc.kdm
i want to search in the above file the key word like abc
looking for two outcomes by passing the parameter value as abc into function and the two outocmes are... (0 Replies)
Discussion started by: silgun
0 Replies
5. Shell Programming and Scripting
Hi Experts,
I have many CSV data files in the below format (Example) :-
Doc Number,Line Number,Condition Number
111,10,ABC
111,10,PQR
111,10,XYZ
222,20,DEF
222,20,EFG
222,20,HIJ
333,30,CCC
333,30,TCP
Now, for the above data i want to get the row count based on the Doc Number & Line... (9 Replies)
Discussion started by: naikamit
9 Replies
6. UNIX for Dummies Questions & Answers
Hi,
It is very interesting to learn the unix, i just struck with a doubt like i have below content in my file
xyz
xyz xyz
xyz
i just want know the word count by using grep -wc 'xyz' <filename>,
but it is giving 3 instead of 4.So i understood that it is showing matched line numbers count... (2 Replies)
Discussion started by: vmachava
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I trying to sort information in a file by making count for every object. For example:
A
B
A
D
A
B
C
i would like to sort out count for each object (A's, B's and etc) but in actual case i dont know the object but i know the position ofthe object. do i need to use array as well? Any... (2 Replies)
Discussion started by: sukhpal_78
2 Replies
8. UNIX for Dummies Questions & Answers
Hi
My files is like
a|test|s|
b|test2 | n|
c|ggg|v|
i want to count the no of lines which is ending with "|" ...
Please let me know how can it be done.
Thanks,
Arun (4 Replies)
Discussion started by: arunkumar_mca
4 Replies
9. UNIX for Dummies Questions & Answers
The following command lists the files which has "wPOREQ" in the files whose names are like:M*08042007*
grep -l "aaa" M*08042007*
I want to know the count of the files.
Thank you for the help. (2 Replies)
Discussion started by: sudheshnaiyer
2 Replies
10. UNIX for Dummies Questions & Answers
I need to count the number of instances of a dir in a set of dir with the same suffix .txt (one dir and all recursive directories).
<Main Dir>
<sub_dir1>
<sub_dir2>
<sub_dir3>
<sub_dir4>
and count the number of instances of a type of file, ie/ .txt files (3 Replies)
Discussion started by: t4st33@mac.com
3 Replies