Search Results

Search: Posts Made By: a.brassac
2,418
Posted By a.brassac
ok I got it, i misunderstood "-k1". I thought it...
ok I got it, i misunderstood "-k1". I thought it meant -k1[,1], that default for POS2 was same as POS1, when actually it means -k1,n where n is the last field. And since 10 < 1\\t, it all make sense....
2,418
Posted By a.brassac
Hi vgersh99, Thanks but I actually want a sort...
Hi vgersh99,
Thanks but I actually want a sort based on the string values. I try to understand that 2nd output as it's a mystery to me!

Jgt,
wait i'm not sure I understand. i thought -kX1,Y1...
2,418
Posted By a.brassac
That's odd.. It's a direct copy/paste from...
That's odd..

It's a direct copy/paste from my terminal....:

14:33:55 anthony:~$ echo -e "1\ta\n10\tb\n20\tc\n2\td" | sort -k1,1
1 a
10 b
2 d
20 c
14:33:56 anthony:~$ echo -e...
2,418
Posted By a.brassac
sort mystery
Hi everyone,

I can't seem to understand the behavior of sort on a particular case.

cat tmp25
1 a
10 b
20 c
2 d

I do that:

sort -k1,1 tmp25
1 a
10 b
2 d
20 ...
4,302
Posted By a.brassac
Thanks a lot guys, that's very helpful ;)
Thanks a lot guys, that's very helpful ;)
4,302
Posted By a.brassac
Thank you both. So what I understand from...
Thank you both.

So what I understand from what you say, is that doing this:

cat my_file | sort > tmp
uniq <tmp

and

cat my_file | sort | uniq

is equivalent in terms of the result it...
4,302
Posted By a.brassac
Do pipes know when they have to "wait" for all the data?
Hi,
I was wondering if pipes ("|"), or rather the command that follow them, know when they're supposed to wait for all the data?

For instance, if you take this:

cat my_file | sort | uniq
...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 05:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy