Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New call out box: Don't over-write a file in-place #456

Closed
rgaiacs opened this issue Sep 29, 2016 · 1 comment
Closed

New call out box: Don't over-write a file in-place #456

rgaiacs opened this issue Sep 29, 2016 · 1 comment

Comments

@rgaiacs
Copy link
Contributor

rgaiacs commented Sep 29, 2016

Later in Python, R or MATLAB we will say to the students that they can create a variable with

x = 1

and they can increase the variable in one unit with

x = x + 1

Students can extend this model to bash and thing they can use

$ sort -n lengths.txt > lengths.txt
$ head -n 1 lengths.txt

instead of

$ sort -n lengths.txt > sorted-lengths.txt
$ head -n 1 sorted-lengths.txt

that is one of the examples in http://swcarpentry.github.io/shell-novice/04-pipefilter/. Unfortunately they can't do that (as explained at http://stackoverflow.com/questions/10586623/why-piping-to-the-same-file-doesnt-work-on-some-platforms). I want to suggest add a call out box after the example warning learners about this.

@shwina
Copy link

shwina commented Oct 5, 2016

Great point. Opened PR

@shwina shwina closed this as completed Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants