LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   case sensitivity (https://www.linuxquestions.org/questions/linux-general-1/case-sensitivity-707867/)

newbiesforever 02-26-2009 10:07 PM

case sensitivity
 
Why are Linux commands so case-sensitive? I see it all the time in terminal windows, and wonder at it. For instance, how is "NDISWRAPPER -i [file]" any different from "ndiswrapper -I [file]"? And just now, I hit F7 in KWrite to enter the "date" command. My caps lock was on, and KWrite didn't recognize "DATE." Since it means the same thing, it's ridiculous to me.

ErV 02-26-2009 10:45 PM

Quote:

Originally Posted by newbiesforever (Post 3458900)
Why are Linux commands so case-sensitive? I see it all the time in terminal windows, and wonder at it. For instance, how is "NDISWRAPPER -i [file]" any different from "ndiswrapper -I [file]"? And just now, I hit F7 in KWrite to enter the "date" command. My caps lock was on, and KWrite didn't recognize "DATE."

Case-sensitivity is greate for making your own version of commands, aliases, or visually distinguishing shell variables from commands in scripts.

Quote:

Originally Posted by newbiesforever (Post 3458900)
Since it means the same thing, it's ridiculous to me.

Machine doesn't know what you meant, it only know what you told it to do.
"DATE" isn't the same as "date".

Anyway, commands are case-sensitive because they are programs and filesystem is case-sensitive. Honestly, I like it this way, because I remember getting problems because of case-insensitivity on windows (in certain cases in programming), and case-sensitivity makes you better organized. Also with case-sensitive filesystem you can create directory and file with same name. Without it you can't do that.

If you don't like this:
http://ubuntuforums.org/showpost.php...05&postcount=6
But I wouldn't recommend that.

i92guboj 02-26-2009 11:08 PM

Quote:

Originally Posted by newbiesforever (Post 3458900)
Why are Linux commands so case-sensitive?

Why is the sky so blue... It's just the way it is. Or at least, the way we perceive it (not the "blue" means anything to the sky, it's just an arbitrary name for a sensation that a certain wavelength range of light produces in our brain.

When you write a letter, you write it following some rules. You don't write "my Dog iS lazy.", nor "my dog IS LAZY", nor even "my dog is lazy.". You write this:

Quote:

My dog is lazy.
And anything else is -strictly speaking- incorrect in most contexts.

Well, Linux has it's own language, and you have to learn it to be able to speak it. It's that simple. Case sensivity is just part of Linux. Some people like it, some others don't, but it's just part of Linux, just like accents and dieresis are part of the Spanish language and kanji, katakana and hirakana are part of the Japanese one. Asking "why language X is not like my language" doesn't make much sense to me. Just like asking "why linux doesn't behave like windows/dos" (which I suspect is the real question here).

Quote:

Since it means the same thing, it's ridiculous to me.
Maybe for you, and only semantically speaking. Even in human language, these subtle things are important, You obviously don't mean the same when you say "us" or "US" (unless we are living in the US :p ), and when you want to write the first person pronoun you write "I" (uppercase) and not "i".

In my opinion, ambiguity in a language is a bad thing. There are all kind of different opinions of course.

Disclaimer: English is not my native language, so maybe the examples above were not the best, still I think they are understandable enough for my illustrative purpose.


All times are GMT -5. The time now is 06:44 AM.