1 2 3 4 5 6 7 8 9
#!/bin/bash VALGRIND=$(which valgrind 2>&1) if [ -x "$VALGRIND" ]; then exec "$VALGRIND" --leak-check=full --show-reachable=yes "$@" else exec "$@" fi