swcarpentry / DEPRECATED-bc

DEPRECATED: This repository is now frozen - please see individual lesson repositories.
Other
299 stars 383 forks source link

Fix shell 05-script goostats option error #633

Closed jensv closed 9 years ago

jensv commented 9 years ago

I added option handling to goostats with getopts.

goostats as added in #254 is returning an error when used with the options -J 100 -r as described in lesson 5. -J was being passed to head which returned invalid option. To fix this I added option handling with getopts. I assume the contents of goostats will not usually be looked at in a bootcamp. Coincidentally at 2014-07-28-stanford a student asked how to handle options. So it came in handy as an example :)