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