dCore Import Debian Packages to Mountable SCE extensions > dCore x86 Imported Extensions

Xtc and ~/.X.d/ scripts

<< < (2/3) > >>

Rich:
Hi Jason W
Is the default in dCore  GNU sort  or  busybox sort? If it's  busybox sort,  then the  -g  option looks like it will work for this use too:

--- Code: ---tc@box:~$ cat 123
12
1a
11a
1A
11A
tc@box:~$ cat 123 | busybox sort -g
1A
1a
11A
11a
12
tc@box:~$
--- End code ---

Jason W:
Oops, it's busybox.  Actually, 'busybox sort -dn' gives a goog output also. 



--- Code: ---jason@box:~/1$ /bb/find  | /bb/sort -dn
.
./AAA
./B
./B1
./B12
./B123
./ZZ
./a1
./a10
./a11
./aaax
./zzzx
./1A
./1a
./11A
./11a
./12
jason@box:~/1$

--- End code ---


'busybox sort -g' gives me the following:


--- Code: ---jason@box:~/1$ /bb/find  | /bb/sort -g
.
./11A
./11a
./12
./1A
./1a
./AAA
./B
./B1
./B12
./B123
./ZZ
./a1
./a10
./a11
./aaax
./zzzx
jason@box:~/1$

--- End code ---

Rich:
Hi Jason W
I guess my version of  busybox sort -g  just works better than yours. :) At any rate, looks good.

Rich:
Hi Jason W
Interesting. Using your list I get the same result:

--- Code: ---tc@box:~$ cat 123 | sort -g
./11A
./11a
./12
./1A
./1a
./AAA
./B
./B1
./B12
./B123
./ZZ
./a1
./a10
./a11
tc@box:~$
--- End code ---
However, if I remove the leading  ./  from the entries, I get the correct result:

--- Code: ---tc@box:~$ cat 123 | sort -g
AAA
B
B1
B12
B123
ZZ
a1
a10
a11
1A
1a
11A
11a
12
tc@box:~$
--- End code ---

Jason W:
Hi Rich.  You are right, when I use busybox find and "sort -g" I get the right order if I use the command as it basically  is in .xinitrc and I think that should work.



--- Code: ---jason$ /bb/find /home/jason/.X.d/ -type f -print | /bb/sort -g
/home/jason/.X.d/1
/home/jason/.X.d/10
/home/jason/.X.d/100
/home/jason/.X.d/1000
/home/jason/.X.d/10A
/home/jason/.X.d/10B
/home/jason/.X.d/10a
/home/jason/.X.d/10b
/home/jason/.X.d/12
/home/jason/.X.d/123
/home/jason/.X.d/321
/home/jason/.X.d/4
/home/jason/.X.d/5
/home/jason/.X.d/55
/home/jason/.X.d/AA
/home/jason/.X.d/ZZ
/home/jason/.X.d/aa
/home/jason/.X.d/aaaastartupsound
/home/jason/.X.d/df
/home/jason/.X.d/mouse
/home/jason/.X.d/pulseaudio
/home/jason/.X.d/time
/home/jason/.X.d/wbar
/home/jason/.X.d/xrandr
/home/jason/.X.d/xterm
/home/jason/.X.d/zz
/home/jason/.X.d/zzrollup
jason$

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version