#!/bin/sh while true; do if [ -f cusips_to_price.txt ]; then R CMD BATCH --no-restore --no-save build_portfolios.R logs/build_portfolios.Rout & fi if [ -f scenarios.txt ]; then R CMD BATCH --no-restore --no-save build_scenarios.R logs/build_scenarios.Rout if [ $HOSTNAME = "gomez" ]; then pythonexec=python2 else pythonexec=python fi $pythonexec ../code/python/intex_scenarios.py >logs/intex_scenarios.out fi sleep 3 done