Skip to content

Instantly share code, notes, and snippets.

View bquistorff's full-sized avatar

Brian Quistorff bquistorff

View GitHub Profile
@bquistorff
bquistorff / statab.sh
Last active June 5, 2019 18:21 — forked from pschumm/statab
Wrapper for launching Stata in batch-mode
#! /bin/bash
# Wrapper for Stata batch-mode which:
# -issues an informative error msg and appropriate (possibly non-zero) return code
# -allows an implicit -do- when called with just a do file
# Requirements: set $STATABATCH (e.g. 'stata-mp -b')
# updated from Phil Schumm's version at https://gist.github.com/pschumm/b967dfc7f723507ac4be
args=$# # number of args