forked from evolix/evobackup
Revert "Fix variable reading in case VAR is specified multiple times in file."
This reverts commit 89580f2929
.
This commit is contained in:
parent
89580f2929
commit
5739b8afe2
|
@ -445,7 +445,7 @@ read_variable() {
|
|||
|
||||
pattern="^\s*${var_name}=.+"
|
||||
|
||||
grep --extended-regexp --only-matching "${pattern}" "${file}" | tail -1 | cut -d= -f2 | head -1
|
||||
grep --extended-regexp --only-matching "${pattern}" "${file}" | tail -1 | cut -d= -f2
|
||||
}
|
||||
|
||||
read_numerical_variable() {
|
||||
|
@ -454,5 +454,5 @@ read_numerical_variable() {
|
|||
|
||||
pattern="^\s*${var_name}=-?[0-9]+"
|
||||
|
||||
grep --extended-regexp --only-matching "${pattern}" "${file}" | tail -1 | cut -d= -f2 | head -1
|
||||
grep --extended-regexp --only-matching "${pattern}" "${file}" | tail -1 | cut -d= -f2
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue