os/grep
This commit is contained in:
parent
cd2f40f398
commit
855ac59ed3
1 changed files with 4 additions and 4 deletions
|
@ -221,10 +221,10 @@ spcd_openssl_x509() {
|
||||||
# ╰───────────┴────╯
|
# ╰───────────┴────╯
|
||||||
|
|
||||||
spcd_os_grep() {
|
spcd_os_grep() {
|
||||||
spcd_os_grep__variable="${1}"
|
local variable="${1}"
|
||||||
[ -n "${spcd_os_grep__variable}" ] &&
|
[ -n "${variable}" ] &&
|
||||||
grep "^${spcd_os_grep__variable}=" "/etc/os-release" |
|
grep "^${variable}=" "/etc/os-release" |
|
||||||
sed "s|^${spcd_os_grep__variable}=||" |
|
sed "s|^${variable}=||" |
|
||||||
sed "s|^\"\(.*\)\"$|\1|"
|
sed "s|^\"\(.*\)\"$|\1|"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue