#!/usr/bin/env bash if [ $1 ]; then echo 'Watch a file for commands to run with rbash' else :> ~/.wcron tail -f ~/.wcron | ( while true; do read line if [ ! $? = 0 ]; then break; fi bash --noprofile --norc -rc "$line" done) fi