#!/bin/bash case $[ $RANDOM % 4 ] in 0) exit $[ $RANDOM % 100 ];; 1) kill $$;; 2) sleep 5;; 3) echo OK;; esac