0

From my understanding, bash is case sensitive. So cd .. would work and CD .. wouldn't.

However, inputting CD .. doesn't throw any errors (it doesn't do anything). Why is that? If I type an incorrect command such as ls-a instead of ls -a the terminal throws an error immediately, but for CD .. nothing is displayed. In fact, I thought it actually worked until I took a closer look at my directory.

Also, if the error is being suppressed by default, is there a way to have it throw an error?

My biggest concern is that no errors are being thrown, and I am under the false impression my commands are actually working making it harder to debug.

9
  • 1
    Ask Bash what it thinks the CD command is: type CD. Commented Nov 7, 2016 at 21:49
  • Here's what I got back: CD is hashed (/usr/bin/CD) Commented Nov 7, 2016 at 21:50
  • Are you on a Mac? Does typing cD work, too? Commented Nov 7, 2016 at 21:50
  • Yes, I am. Should I add another tag to clarify? If so which tag? Commented Nov 7, 2016 at 21:51
  • 2
    Ok, I think this is a dup of Why can Shell builtins not be run with capital letters but other commands can. Can you see if the answer there answers your question? Commented Nov 7, 2016 at 21:58

2 Answers 2

0

I think your distro has an alias or symlink of it. This is the normal behavior (Debian):

$CD .. mksh: CD: not found $ CD .. bash: CD: command not found 
-1

That's an Apple bug, your options are;

  • re-install MacOS with case-sensitive enabled.
  • report the bug to Apple.
  • Install Linux

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.