comparison usearch_wrapper.sh @ 36:eca87767a73c draft default tip

Uploaded
author serranop
date Sat, 14 Sep 2013 13:54:52 -0400
parents eec0db6ca419
children
comparison
equal deleted inserted replaced
35:311ab474a270 36:eca87767a73c
1 #!/bin/bash 1 #!/bin/bash
2
3 # Print the command
2 echo "$*" 4 echo "$*"
5
6 # Direct stderr to stdout and save output
3 OUTPUT=`$* 2>&1` 7 OUTPUT=`$* 2>&1`
8
9 # Direct stdout to stderr on failure
4 if [ $? -ne 0 ] 10 if [ $? -ne 0 ]
5 then 11 then
6 echo "ERROR: $OUTPUT" 1>&2 12 echo "ERROR: $OUTPUT" 1>&2
7 exit 13 exit
8 fi 14 fi
15
16 # Print output
9 echo $OUTPUT 17 echo $OUTPUT