Hello..

I'm currently studying using utilities and tools available at the 
terminal. I'm puzzled by sort's behavior. The manual says that it does 
not ignore trailing whitespace when sorting, you'd have to put the -b 
option. However with or without the -b option, it ignores whitespace...


$ cat > sample
eggs
  ham
 bacon
   bread

$ sort sample
 bacon
   bread
eggs
  ham

$ sort -b sample
 bacon
   bread
eggs
  ham

without -b should be:
   bread
  ham
 bacon
eggs


Secondly, the manual also says that sort puts capital letter before the 
small ones. The -f option should be used to "fold" the uppercase and 
lowercase together. As with above, with or without the option it does this:


$ cat > sample
Eggs
bacon
ham
Bread

$ sort sample
bacon
Bread
Eggs
ham

$ sort -f sample
bacon
Bread
Eggs
ham

without -f should be:
Bread
Eggs
bacon
ham


Bugs or features, what am I missing here?
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to