Start New Discussion Reply to this Discussion How do i sort these values using Bash Script in Linux?
-53 45
-54 43
-55 42
-56 41
-57 40
-59 37
-61 35
-61 36
-62 34
-64 33
-65 31
-65 32
-67 30
-68 29
-69 28
-72 25
-73 23
-73 24
-74 22
-76 20
-76 22
-78 20
-79 18
-80 17
-81 16
In the above you will see that at -61 occurs twice and so do some other values. I want to just create a new file without any duplicates. So the new file should have either -61 35 or -61 36 ...
how do i do that?! I tried using sort using uniq but that didn't work.. Please help!?
matharoo
Newbie Poster
13 posts since Feb 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
sort -t" " -nuk 1 filename.txt
ravi89
Junior Poster
117 posts since Jun 2009
Reputation Points: 11
Solved Threads: 14
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page rendered in 0.0594 seconds
using 2.64MB