mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 03:50:33 +03:00
comment stripcom() and make the variable name consistent with others
This commit is contained in:
parent
c5af8e5f24
commit
f3b635a3aa
@ -1457,13 +1457,18 @@ rename_user_queue() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stripcom() {
|
stripcom() {
|
||||||
local _file="$1"
|
# This function removes comments and blank lines from the file given as
|
||||||
|
# the argument. It deletes lines beginning with zero or more whitespaces
|
||||||
|
# and a comment symbol, strips any text after whitespace and a comment
|
||||||
|
# symbol, and deletes blank or whitespace-only lines.
|
||||||
|
|
||||||
|
local FILE="$1"
|
||||||
|
|
||||||
sed '
|
sed '
|
||||||
/^[ \t]*#/d
|
/^[ \t]*#/d
|
||||||
s/[ \t][ \t]*#.*//
|
s/[ \t][ \t]*#.*//
|
||||||
/^[ \t]*$/d
|
/^[ \t]*$/d
|
||||||
' $_file
|
' $FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
save_user_queue() {
|
save_user_queue() {
|
||||||
|
Loading…
Reference in New Issue
Block a user