LibraryCarpentry / lc-shell

Library Carpentry: The UNIX Shell
https://librarycarpentry.org/lc-shell/
Other
28 stars 86 forks source link

Recommend creating loop files in their own directory #273

Open maneesha opened 1 month ago

maneesha commented 1 month ago

How could the content be improved?

In the loop episode, the first step is to create some files using

$ touch a.txt b.txt c.txt d.txt

and then later to loop through them using

$ for filename in ?.txt
> do
>    echo "$filename"
>    cp "$filename" backup_"$filename"
> done

If those four files were created in the same directory that the lesson's data files were saved in, then the lesson's *.txt files would get used in this loop. If we don't want to include those, then the files created here should be in their own directory.

Which part of the content does your suggestion apply to?

https://librarycarpentry.org/lc-shell/03-working-with-files-and-folders.html#using-history