#!/bin/sh CMD='sleep 8' OUTPUT=$(eval "$CMD" 2>&1) sleep 4