Revision 9214
Added by Aaron Marcuse-Kubitza about 11 years ago
db.sh | ||
---|---|---|
64 | 64 |
|
65 | 65 |
set -- ${database:+--database="$database" }--column-names "$@" |
66 | 66 |
if test "$output_data"; then echo_stdin|mysql_cmd --batch "$@" |
67 |
else limit_stdout=1 mysql_cmd --verbose "$@"
|
|
67 |
else cmd_log_fd=1 mysql_cmd --verbose "$@"
|
|
68 | 68 |
fi |
69 | 69 |
} |
70 | 70 |
|
Also available in: Unified diff
lib/sh/util.sh: command(): use just one control var $cmd_log_fd instead of three flags (limit_log_fd, limit_stdout, stderr_is_errors) that indicated various common fd configurations. this is much clearer (you state which fd the common uses as its logging fd), more configurable (the logging fd can be any fd, not just 1 or 2), and more automatic (redirecting fd 2 to err_fd happens automatically if it isn't used for logging).