diff 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 diff
--- a/usearch_wrapper.sh	Sat Sep 14 13:46:29 2013 -0400
+++ b/usearch_wrapper.sh	Sat Sep 14 13:54:52 2013 -0400
@@ -1,9 +1,17 @@
 #!/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