Giter Site home page Giter Site logo

Comments (3)

gvwilson avatar gvwilson commented on July 16, 2024
  • +1 to having a newcomer do it.
  • -1 to including this in the novice lesson -- it's not useful to
    scientists right away.
  • +1 to including it in shell-extras along with job control or cron.

Thanks,
Greg

from shell-novice.

rgaiacs avatar rgaiacs commented on July 16, 2024

@iglpdc My suggestion is change a little our starting point to something like

Nelle Nemo, a marine biologist, has just returned from a six-month survey of the North Pacific Gyre, where she has been sampling gelatinous marine life in the Great Pacific Garbage Patch. She has 300 samples that still in Great Pacific Garbage Patch's server since her laptop broken during the return. One college from Nelle's lab helps getting all the 300 samples with

for i in $(seq 1 300)
do
wget http://someaddress.com/${i}
sleep 10
done

that only takes a few minutes instead of hours if Nelle goes clicking one by one with the mouse.

The `sleep` command was needed because the server only accept a few request per minute.

Now, Nelle has to analyses her data using some programs. Based on the experience of downloading her data she decided to learn a little about the Unix shell to save a lot of time since ... 

And add a note at instructors note that they should mention CTRL+C when running this example.

from shell-novice.

gvwilson avatar gvwilson commented on July 16, 2024

In shell-extras, +1, but definitely not in shell-novice: we're not going
to try go introduce seq, wget, and ${i}.

On 2015-03-19 3:30 PM, Raniere Silva wrote:

@iglpdc https://github.com/iglpdc My suggestion is change a little
our starting point to something like

Nelle Nemo, a marine biologist, has just returned from a six-month
survey of the North Pacific Gyre, where she has been sampling
gelatinous marine life in the Great Pacific Garbage Patch. She has
300 samples that still in Great Pacific Garbage Patch's server
since her laptop broken during the return. One college from
Nelle's lab helps getting all the 300 samples with

|for i in $(seq 1 300)
do
wget http://someaddress.com/${i}
sleep 10
done

that only takes a few minutes instead of hours if Nelle goes clicking one by one with the mouse.

The `sleep` command was needed because the server only accept a few request per minute.

Now, Nelle has to analyses her data using some programs. Based on the experience of downloading her data she decided to learn a little about the Unix shell to save a lot of time since ...
|

And add a note at instructors note that they should mention |CTRL+C|
when running this example.


Reply to this email directly or view it on GitHub
#108 (comment).

Dr. Greg Wilson | [email protected]
Software Carpentry | http://software-carpentry.org

from shell-novice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.