10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Platform :Oracle Linux 6.4
Shell : bash
The below file has 7 lines , some of them are duplicates. There are only 3 distinct lines. But why is the uniq command still showing 7 ?
I just want the distinct lines to be returned.
$ cat test.txt
SELECT FC.COORD_SET_ID FROM OM_ORDER_FLOW F, -... (2 Replies)
Discussion started by: kraljic
2 Replies
2. Shell Programming and Scripting
Dear Friends,
I want to know if it is possible to perform addition as part of uniq command.
Input:
213.64.56.208 1
213.64.56.208 2
213.64.56.208 3
213.46.27.204 10
213.46.27.204 20
213.46.27.204 30
The above input should be converted as follows
213.64.56.208 6
213.46.27.204 60
... (4 Replies)
Discussion started by: tamil.pamaran
4 Replies
3. UNIX for Advanced & Expert Users
at which situation uniq command fails.
How to delete/remove duplicate lines in an unix file (1 Reply)
Discussion started by: tp2115
1 Replies
4. Shell Programming and Scripting
Hello, I have a file with a list of car makes and specific information for each make. An example is:
@Audi:Warranty
@Audi:Pricing
@Audi:Colors
@Acura:Warranty
@Acura:Pricing
@Acura:Colors
and so on through a bunch of makes. I need to make a list in a selection box of just one name of... (12 Replies)
Discussion started by: macbb1117
12 Replies
5. Shell Programming and Scripting
Does any one know any command runs faster than this to give duplicate numbers
cat file1 file2 ....file 100 | sort |uniq -c
thanx (3 Replies)
Discussion started by: quincyjones
3 Replies
6. UNIX for Advanced & Expert Users
I have a file with list of redundant server names and want only unique ones of those.
I have used following command but still redudant ones are listing
$cat file|sort|uniq
where could be the problem.
Thanks,
Srinivas (3 Replies)
Discussion started by: srinivas Juluri
3 Replies
7. UNIX for Dummies Questions & Answers
My file has
k
s
j
v
l
k
a
s
f
l
k
s
a
d
f
j
l
a
s (3 Replies)
Discussion started by: phoenix_nebula
3 Replies
8. Shell Programming and Scripting
I call....
cat 1.txt | uniq -c
Sample of whats in 1.txt
vmstat
cd
exit
w
cd
cd
cd
newgrp
xinit
f
cd
cd
cd
rlogin (2 Replies)
Discussion started by: Bandit390
2 Replies
9. Shell Programming and Scripting
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies
10. UNIX for Dummies Questions & Answers
HI,
Please tell the usage of uniq command in UNIX with example
Thanks (2 Replies)
Discussion started by: skyineyes
2 Replies