#! /bin/bash

if [[ $# -ne 1 ]]; then
	echo "Need to supply file to run" >2
	exit 1
elif [[ ! -f $1 ]]; then
	echo "Need to supply file to run" >2
	exit 1
fi

ruby "$1" > "${1/.rb}"-ruby.output 2>&1
irb "$1" > "${1/.rb}"-irb.output 2>&1