mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 05:29:30 +00:00
- section() revamp
- Redirect STDERR for the collection part in both tools - rm_tempdir in sigtrap - A part of pt-mysql-summary still depended on the system being run, rather than the samples being read. Now it works properly.
This commit is contained in:
@@ -64,7 +64,12 @@ fuzzy_pct () {
|
||||
# with #'s and all underscores with spaces.
|
||||
section () {
|
||||
local str="$1"
|
||||
local line="$(printf '#_%-60s' "${str}_" | sed -e 's/[[:space:]]/#/g' -e 's/_/ /g')"
|
||||
local line="$(printf '# %-60s' "${str} _" | awk '{
|
||||
i = index($0, "_");
|
||||
x = substr($0, i);
|
||||
gsub(/[_ \t]/, "#", x);
|
||||
printf("%s%s\n", substr($0, 0, i-1), x);
|
||||
}')"
|
||||
printf "%s\n" "${line}"
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user