swcarpentry / shell-novice

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

pipe/filter: -l vs -1 #740

Open marwahaha opened 6 years ago

marwahaha commented 6 years ago

In the class, several learners confuse the -l with the -1, especially in the serif'd fonts in the graphic.

I'm not sure if we can clarify the graphic, or at least give a few tips in the lesson or instructor guide that -l is NOT -1.

:)

gcapes commented 6 years ago

I've also had a few questions on this. The font could certainly make the distinction clearer. For programming, this is a useful font-selection criteria, along with slashed zeros to distinguish 0 and O. The font is probably something for the styles repository though?

gdevenyi commented 6 years ago

The graphics are pretty old, doubtful it's been standardized. Welcome a PR that fixes the fonts

colinmorris commented 6 years ago

Another alternative would be to use the long form of the option, --lines.

deppen8 commented 3 years ago

Closing as part of old issue cleanup. If there is still appetite for this change, we can reopen.

gcapes commented 3 years ago

I think this is sufficiently a 'bug' that we should keep it open as a reminder to address it. http://swcarpentry.github.io/shell-novice/fig/redirects-and-pipes.svg

alena-malyarenko commented 1 year ago

Based on other figures, I think Helvetica is good enough code font. Is this clearer?

redirects-and-pipes

knarrff commented 1 year ago

I can confirm that this can be confusing - it has been an issue in our courses as well. However: as far as I understand, you are not supposed to show the direct rendered output of Carpentry classes anyway: you are supposed to show your own terminal where you type those commands and ideally talk while doing it.

With this in mind, I suggest instead to maybe add a sentence in the right places to the instructions, reminding instructors to mention specifically that this is a letter or number depending on the place.

In addition: do we have a case when a terminal by default chooses a font that makes this difficult?

gcapes commented 1 year ago

These lessons can (and are) used in a variety of ways. Some instructors don't show the notes: some always do. So given that some instructors do show this image, it would be good to make the font less ambiguous.

Helvetica is probably a good choice, but is Helvetica used throughout that new image? The 1 looks to have a serif at the bottom which isn't visible here: https://freefontsfamily.com/helvetica-font-family/

Either way it looks good to me.

zephyrdark commented 1 year ago

I am a beginner learning from the website myself. I often use the --help option to figure out the syntax of commands like wc. I believe this issue affects self-learners more than classroom learners.

Combining the above comments, perhaps a reminder can be added directly to the offending sentence in https://swcarpentry.github.io/shell-novice/04-pipefilter.html:

wc is the ‘word count’ command: it counts the number of lines, words, and characters in files (returning the values in that order from left to right). Reminder: Shell commands like wc often allow using options to change their outputs. In this example, the -l option is used. wc -l is actually shortened version of wc --line.