hpc-carpentry / hpc-shell

Materials to teach terminal fundamentals for HPC users
https://hpc-carpentry.github.io/hpc-shell/
Other
19 stars 23 forks source link

Consider renaming "columns" in "Scripts, variables, and loops" episode #24

Closed mattagape closed 4 years ago

mattagape commented 4 years ago

In "Scripts, variables, and loops" episode, consider using the term "section" instead of "column" for the text underneath "That’s a huge amount of output. Let’s see if we can understand what it is, working left to right."

Because in the existing text, a "column" is made up of several columns of text.

e.g. a time last modified such as Jan 16 19:17 is referred to as column 5, whereas I would argue this is 3 columns.

I don't want to just do a PR on this because I think it needs to be discussed first.

tkphd commented 4 years ago

This one's tough. For the layperson, the output of ls -l is columnar, with the fixed width of each field delineating. The date "column" contains spaces, but that's easy enough for the human eye to interpret correctly.

For a shell aficionado, the date "column" is indeed multiple columns in itself, since tools like cut/awk would break it up into multiple pieces. Some folks on the Internet refer to the "fields" of output, which might be a better term than "section."

For the purposes of this lesson, where we are not assuming great familiarity with shell commands, I am in favor of leaving the text as it is and assuming the lay interpretation of "column". I am prepared to be convinced otherwise, esp. if someone cares deeply about this.

I should also note that the date is the sixth field/column/section, since the column of numbers is not attached to the permissions, but represents the number of hardlinks related to the item. Also, a couple of the timestamps appear to be corrupted, listing 2016 rather than 20:16.

mattagape commented 4 years ago

@tkphd Thanks. I guess "field" would be a better term.

Regarding the corruption, I don't think it is. Using ls -l, you do indeed see the year instead of the time, if it was earlier than the current year.

tkphd commented 4 years ago

True, and good point.

mattagape commented 4 years ago

I've just noticed that we don't explain what the number after the permission octets is

i.e. in a line like drwxr-xr-x 3 user mygroup 4096 Jul 9 15:58 .cache

what the 3 means. It is the number of hard links to the file/directory. Should we explain what that means?

But I am conscious that we don't want to overwhelm people with information to absorb...although if it's in the notes they can refer to after the lesson, that might be good.

I guess this should be a separate issue?

tkphd commented 4 years ago

Taken care of in #26.