cd_grep_os
This commit is contained in:
parent
58262405bf
commit
5e8dd6fec2
1 changed files with 4 additions and 4 deletions
8
cd.sh
8
cd.sh
|
@ -626,10 +626,10 @@ local variable="${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_grep_os () {
|
cd_grep_os () {
|
||||||
local variable="${1}"
|
cd_grep_os__variable="${1}"
|
||||||
if [ "${variable}" ] ; then
|
if [ "${cd_grep_os__variable}" ] ; then
|
||||||
grep "^${variable}=" "/etc/os-release" \
|
grep "^${cd_grep_os__variable}=" "/etc/os-release" \
|
||||||
| sed "s|^${variable}=||" \
|
| sed "s|^${cd_grep_os__variable}=||" \
|
||||||
| sed "s|^\"\(.*\)\"$|\1|"
|
| sed "s|^\"\(.*\)\"$|\1|"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue