mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
chore: fix some typos (#2974)
Signed-off-by: occupyhabit <wangmengjiao@outlook.com>
This commit is contained in:
parent
6425f079d1
commit
641cf2c6b1
6
ttar
6
ttar
|
@ -212,16 +212,16 @@ function extract {
|
||||||
local eof_without_newline
|
local eof_without_newline
|
||||||
if [ "$size" -gt 0 ]; then
|
if [ "$size" -gt 0 ]; then
|
||||||
if [[ "$line" =~ [^\\]EOF ]]; then
|
if [[ "$line" =~ [^\\]EOF ]]; then
|
||||||
# An EOF not preceeded by a backslash indicates that the line
|
# An EOF not preceded by a backslash indicates that the line
|
||||||
# does not end with a newline
|
# does not end with a newline
|
||||||
eof_without_newline=1
|
eof_without_newline=1
|
||||||
else
|
else
|
||||||
eof_without_newline=0
|
eof_without_newline=0
|
||||||
fi
|
fi
|
||||||
# Replace NULLBYTE with null byte if at beginning of line
|
# Replace NULLBYTE with null byte if at beginning of line
|
||||||
# Replace NULLBYTE with null byte unless preceeded by backslash
|
# Replace NULLBYTE with null byte unless preceded by backslash
|
||||||
# Remove one backslash in front of NULLBYTE (if any)
|
# Remove one backslash in front of NULLBYTE (if any)
|
||||||
# Remove EOF unless preceeded by backslash
|
# Remove EOF unless preceded by backslash
|
||||||
# Remove one backslash in front of EOF
|
# Remove one backslash in front of EOF
|
||||||
if [ $USE_PYTHON -eq 1 ]; then
|
if [ $USE_PYTHON -eq 1 ]; then
|
||||||
echo -n "$line" | python -c "$PYTHON_EXTRACT_FILTER" >> "$path"
|
echo -n "$line" | python -c "$PYTHON_EXTRACT_FILTER" >> "$path"
|
||||||
|
|
Loading…
Reference in a new issue