fix: common.sh: getvar: reset i
usually not a problem though? Signed-off-by: fukiame <fukiame@proton.me>
This commit is contained in:
parent
bf2d50e5af
commit
9d5f548050
1 changed files with 1 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ strip_all() {
|
|||
|
||||
getvar() {
|
||||
# Usage: getline "n" "pattern" "file"
|
||||
i=0
|
||||
while IFS= read -r line; do
|
||||
i=$((i+1))
|
||||
[ "$i" = "$1" ] && printf '%s\n' "${line##$2}" && return
|
||||
|
|
|
|||
Reference in a new issue