锘??xml version="1.0" encoding="utf-8" standalone="yes"?>九九视频免费观看视频精品,成人a视频在线,大黄网站在线观看http://www.aygfsteel.com/dedian/category/16533.html-- 鍏蟲敞鎼滅儲寮曟搸鐨勫紑鍙?/description>zh-cnTue, 27 Feb 2007 10:16:06 GMTTue, 27 Feb 2007 10:16:06 GMT60what comparison function is in linux sorting ?http://www.aygfsteel.com/dedian/archive/2007/02/02/97399.htmlDedianDedianThu, 01 Feb 2007 23:10:00 GMThttp://www.aygfsteel.com/dedian/archive/2007/02/02/97399.htmlhttp://www.aygfsteel.com/dedian/comments/97399.htmlhttp://www.aygfsteel.com/dedian/archive/2007/02/02/97399.html#Feedback0http://www.aygfsteel.com/dedian/comments/commentRss/97399.htmlhttp://www.aygfsteel.com/dedian/services/trackbacks/97399.html
...
abca.com
abc-d.com
abce.com
...

I am curious what comparison function it applys in its' sorting function. I supposed it should be a string comparison, like strcmp function, but it is not. coz strcmp will compare ascii code of characters in string one by one, thus above sorting should like this:

abc-d.com
abca.com
abce.com

one guess is that when sorting names the special characters like "." "-" will be skipped. but still got some problem when sorting following names:

abc---d.com
abc--d.com
abc-d.com

why can linux sorting keep this order? if it skips some special characters, above names should be compared equally and maybe sorted as a random order.

confused, anybody has thought about that?

-----
p.s.

Haven't got updated here for quite a long time, coz I am back to program with c under linux and I believe it is a place for Java programmers.

-----

update:

Linux sorting compares unicode of strings 鈥?more about unicode is here






Dedian 2007-02-02 07:10 鍙戣〃璇勮
]]>
How to search a file in Linuxhttp://www.aygfsteel.com/dedian/archive/2006/04/19/41789.htmlDedianDedianTue, 18 Apr 2006 18:04:00 GMThttp://www.aygfsteel.com/dedian/archive/2006/04/19/41789.htmlhttp://www.aygfsteel.com/dedian/comments/41789.htmlhttp://www.aygfsteel.com/dedian/archive/2006/04/19/41789.html#Feedback0http://www.aygfsteel.com/dedian/comments/commentRss/41789.htmlhttp://www.aygfsteel.com/dedian/services/trackbacks/41789.htmlWell, I just want to know how to do file searching in Linux as something like dir <file_name> /s in聽DOS...
by聽google, i found two methods:
ls -R | grep file_name
or
find . -name file_name
^-^


Dedian 2006-04-19 02:04 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 彰化市| 南通市| 那曲县| 卫辉市| 潮州市| 辽宁省| 庆城县| 电白县| 丹凤县| 深圳市| 涿鹿县| 包头市| 淮南市| 大洼县| 乌拉特中旗| 大理市| 昔阳县| 林芝县| 县级市| 石阡县| 海丰县| 中阳县| 汾西县| 治县。| 安仁县| 赣榆县| 博罗县| 塔河县| 大新县| 普兰店市| 聂荣县| 宁晋县| 兴安县| 吐鲁番市| 望奎县| 临沂市| 筠连县| 平果县| 吉隆县| 沧源| 西吉县|