swcarpentry/good-enough-practices-in-scientific-computing

example of 'runall' type file

Closed this issue · 3 comments

Should we add an example of a 'run all' type file? This is a big win that people don't often
do, so I think an example would be helpful.

Please add an example if you have one.

One might be:

This script combines

  • running the command 'zip-script.py' that analyzes some data in a text file and creates multiple zip files.
  • moving those newly created files into a 'saved_zip_files' directory
  • unzipping all the newly created zip files, so that the person can view them
echo "Running script that creates zip output files..." 
mkdir new_zip_files/
 ./zip-script.py *.txt

 echo "saving..."
 mv new_zip_files/*.zip saved_zip_files/

 echo "Unzipping..."
 for filename in *.zip
 do
   unzip $filename
 done

I'm not sure if this is more helpful or more confusing though. If there was some generic example we were using throughout the paper, for instance calculating temperature, then it might make more sense.