swcarpentry / shell-novice

The Unix Shell
http://swcarpentry.github.io/shell-novice/
Other
375 stars 972 forks source link

Update 03-create.md - Case sensitivity #1393

Open Richard-Regan opened 1 year ago

Richard-Regan commented 1 year ago

Added a Call out section on case sensitivity.

github-actions[bot] commented 1 year ago

:ok: Pre-flight checks passed :smiley:

This pull request has been checked and contains no modified workflow files, spoofing, or invalid commits.

It should be safe to Approve and Run the workflows that need maintainer approval.

bkmgit commented 1 year ago

Thanks. It is a little long and there may be differences between different versions of operating systems. Mac OS has recently switched to zsh as default, though the lesson mostly works ok. Is it possible to reduce it to one or two sentences at most without its own section. The lesson is already quite long and many instructors have trouble finishing.

Richard-Regan commented 1 year ago

Hi,

Not a problem. Would you prefer it to be just an addition the "Good names for files and directories"?

Best Wishes Richard


From: Benson Muite @.> Sent: 16 May 2023 19:33 To: swcarpentry/shell-novice @.> Cc: REGAN, RICHARD @.>; Author @.> Subject: Re: [swcarpentry/shell-novice] Update 03-create.md - Case sensitivity (PR #1393)

[EXTERNAL EMAIL]

Thanks. It is a little long and there may be differences between different versions of operating systems. Mac OS has recently switched to zsh as default, though the lesson mostly works ok. Is it possible to reduce it to one or two sentences at most without its own section. The lesson is already quite long and many instructors have trouble finishing.

— Reply to this email directly, view it on GitHubhttps://github.com/swcarpentry/shell-novice/pull/1393#issuecomment-1550169203, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABIU437Z6PC3BU3SRJLZ4NDXGPB6FANCNFSM6AAAAAAYD26ASA. You are receiving this because you authored the thread.Message ID: @.***>

bkmgit commented 1 year ago

That would be really great. Thanks for your patience and perseverance.

Richard-Regan commented 1 year ago

Hi I have amended this addition, by removing the section and adding the reduced text to the section on "Good names"

Richard-Regan commented 1 year ago

Hi All,

I am concerned I have missed a step with the revised pull request. Can someone confirm they see the updated lesson with the text about case sensitivity added to the section above about naming files and directories, and not in its own section. As this was done over 24h ago and I have not seen any comments.

Best Wishes Richard


From: Jacob Deppen @.> Sent: 16 May 2023 19:45 To: swcarpentry/shell-novice @.> Cc: REGAN, RICHARD @.>; Author @.> Subject: Re: [swcarpentry/shell-novice] Update 03-create.md - Case sensitivity (PR #1393)

[EXTERNAL EMAIL]

@deppen8 requested changes on this pull request.

I think this addition is a bit too much for this early part of the lesson. I made some suggestions that might help it be a little more succinct.


In episodes/03-create.mdhttps://github.com/swcarpentry/shell-novice/pull/1393#discussion_r1195535404:

@@ -148,6 +148,21 @@ expected and can even result in data loss. If you need to refer to names of files or directories that have spaces or other special characters, you should surround the name in quotes ("").

+:::::::::::::::::::::::::::::::::::::::::::::::::: + +::::::::::::::::::::::::::::::::::::::::: callout + +## Case Sensitivity

⬇️ Suggested change

-## Case Sensitivity +## Case sensitivity

Section headers don't use full title case in our style guide.


In episodes/03-create.mdhttps://github.com/swcarpentry/shell-novice/pull/1393#discussion_r1195552026:

@@ -148,6 +148,21 @@ expected and can even result in data loss. If you need to refer to names of files or directories that have spaces or other special characters, you should surround the name in quotes ("").

+:::::::::::::::::::::::::::::::::::::::::::::::::: + +::::::::::::::::::::::::::::::::::::::::: callout + +## Case Sensitivity + +This is normally driven by the underlying OS. In most implementations of BASH it is case sensitive, with the exception of MacOS which is case insensitive. Some OSs have predefined directories that use a capital letter at the start, such as Download, and Desktop. This is used to make these directors stand out.

⬇️ Suggested change

-This is normally driven by the underlying OS. In most implementations of BASH it is case sensitive, with the exception of MacOS which is case insensitive. Some OSs have predefined directories that use a capital letter at the start, such as Download, and Desktop. This is used to make these directors stand out. +Whether or not your Bash shell is case-sensitive is normally determined by the underlying operating system (Windows, MacOS, Linux, etc.). In most implementations of Bash, it is case sensitive. On MacOS, however, it is not case sensitive.


In episodes/03-create.mdhttps://github.com/swcarpentry/shell-novice/pull/1393#discussion_r1195555996:

@@ -148,6 +148,21 @@ expected and can even result in data loss. If you need to refer to names of files or directories that have spaces or other special characters, you should surround the name in quotes ("").

+:::::::::::::::::::::::::::::::::::::::::::::::::: + +::::::::::::::::::::::::::::::::::::::::: callout + +## Case Sensitivity + +This is normally driven by the underlying OS. In most implementations of BASH it is case sensitive, with the exception of MacOS which is case insensitive. Some OSs have predefined directories that use a capital letter at the start, such as Download, and Desktop. This is used to make these directors stand out. + +It is standard practice to use lowercase for your files and directories, but this is only a guideline.

⬇️ Suggested change

-It is standard practice to use lowercase for your files and directories, but this is only a guideline. +It can be a good practice to use all lowercase for files and directories, but this is not a rule; you are likely to see uppercase used in practice.


In episodes/03-create.mdhttps://github.com/swcarpentry/shell-novice/pull/1393#discussion_r1195560262:

+If you choose to use capital letters at the start of your file names, you should bear in mind the fact that sorting order in Unix is (sometimes) case sensitive, and some commands such as grep you may need additional options to achieve the desired result. + +Also this effect is negligible if the letter isn't the first letter in the name, so it's not an issue if you use naming standards such as camelCase. + +

⬇️ Suggested change

-If you choose to use capital letters at the start of your file names, you should bear in mind the fact that sorting order in Unix is (sometimes) case sensitive, and some commands such as grep you may need additional options to achieve the desired result.

-Also this effect is negligible if the letter isn't the first letter in the name, so it's not an issue if you use naming standards such as camelCase.

-

Some of this is rolled into my previous suggestion and the camelCase bit is probably too much for this early in the lesson.

— Reply to this email directly, view it on GitHubhttps://github.com/swcarpentry/shell-novice/pull/1393#pullrequestreview-1429151179, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABIU43Y7FZAIHIHKLIVQ3QLXGPDNDANCNFSM6AAAAAAYD26ASA. You are receiving this because you authored the thread.Message ID: @.***>

bkmgit commented 1 year ago

New version seems mostly ok for me. Lines should be broken at 80 characters. Is it case insensitive for all versions of Mac OS?

gcapes commented 1 year ago

Before merging this, can we please confirm the case-sensitivity on Windows? I thought that Windows was the outlier here not being case sensitive, while linux and macos were. But after a google search it seems that indeed macos is case insensitive too, so it's just linux which is case sensitive(?)

I know it's not really the OS, but rather the filesystem used, but I'm talking default behaviour here.