doubt in sort cmd
3 posters
doubt in sort cmd
wat does sort -t "%" +2 -r filename do... tried this cmd many times...but not gettin any output
...also wy does this happen
[@oracleclient ~]$ cat sort12
98
101
45
56
34
67
66
77
1
2
4
45
[@oracleclient ~]$ sort -r sort12
98
77
67
66
56
45
45
4
34
2
101
1
[@oracleclient ~]$ cat>sort1
1
2
3
6
5
4
9
8
7
[@oracleclient ~]$ sort -r sort1
9
8
7
6
5
4
3
2
1
...also wy does this happen
[@oracleclient ~]$ cat sort12
98
101
45
56
34
67
66
77
1
2
4
45
[@oracleclient ~]$ sort -r sort12
98
77
67
66
56
45
45
4
34
2
101
1
[@oracleclient ~]$ cat>sort1
1
2
3
6
5
4
9
8
7
[@oracleclient ~]$ sort -r sort1
9
8
7
6
5
4
3
2
1
lalitha- Posts : 14
Points : 16
Join date : 2010-03-08
Re: doubt in sort cmd
use sort -nr filename
n stands for numeric sort
n stands for numeric sort
akalya- Posts : 70
Points : 86
Join date : 2010-03-04
Re: doubt in sort cmd
t is used to specify delimiter
[335802@oracleclient ~]$ cat sort3
123:345
456:678
321:654
789:000
000:678
267:678
[335802@oracleclient ~]$ sort -t ":" sort3
000:678
123:345
267:678
321:654
456:678
789:000
[335802@oracleclient ~]$ sort -t ":" -r sort3
789:000
456:678
321:654
267:678
123:345
000:678
[335802@oracleclient ~]$ cat sort3
123:345
456:678
321:654
789:000
000:678
267:678
[335802@oracleclient ~]$ sort -t ":" sort3
000:678
123:345
267:678
321:654
456:678
789:000
[335802@oracleclient ~]$ sort -t ":" -r sort3
789:000
456:678
321:654
267:678
123:345
000:678
akalya- Posts : 70
Points : 86
Join date : 2010-03-04
Re: doubt in sort cmd
thanks akalya...
wats tht +2 al tht
wy do v use tht
wats tht +2 al tht
wy do v use tht
lalitha- Posts : 14
Points : 16
Join date : 2010-03-08
Re: doubt in sort cmd
dnt use quotes
use grep aj* filename
use grep am. filename
use grep aj* filename
use grep am. filename
Maithreyi- Posts : 76
Points : 142
Join date : 2010-03-03
Age : 36
Location : Haldia
Re: doubt in sort cmd
@lalitha
i donno abt +2.....
is there an option like tat???
i din find it in man sort!!!!
i donno abt +2.....
is there an option like tat???
i din find it in man sort!!!!
akalya- Posts : 70
Points : 86
Join date : 2010-03-04
Permissions in this forum:
You cannot reply to topics in this forum
|
|