lc-shell icon indicating copy to clipboard operation
lc-shell copied to clipboard

Add two more options to "less" command

Open DelilahYM opened this issue 2 years ago • 1 comments

In https://librarycarpentry.org/lc-shell/03-working-with-files-and-folders/index.html, when we mentioned "less" command in "Reading files" session, I found it would be very useful to introduce the following two items with "less":

  1. (Display line numbers)The "-N" option with less to display the file with line numbers, which is extremely useful when looking at log/error files, and
  2. (Pattern search) "$ less -pPATTERN filename", OR, once inside less, use "/" followed by your pattern to do interactive searching (forwards). "n" and "N" repeat the search in the forward and reverse direction, respectively.

DelilahYM avatar Aug 15 '22 13:08 DelilahYM

Question. If this is an introduction to the shell I'm not sure if isn't throwing too much at the participants. I have to go back through the lesson and see if wildcards had been introduced yet. Other opinions?

jmjamison avatar Oct 21 '22 20:10 jmjamison