view usearch_wrapper.sh @ 36:eca87767a73c draft default tip

Uploaded
author serranop
date Sat, 14 Sep 2013 13:54:52 -0400
parents eec0db6ca419
children
line wrap: on
line source

#!/bin/bash

# Print the command
echo "$*"

# Direct stderr to stdout and save output
OUTPUT=`$* 2>&1`

# Direct stdout to stderr on failure
if [ $? -ne 0 ]
then
    echo "ERROR: $OUTPUT" 1>&2
    exit
fi

# Print output
echo $OUTPUT