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 () {
|
||||
local variable="${1}"
|
||||
if [ "${variable}" ] ; then
|
||||
grep "^${variable}=" "/etc/os-release" \
|
||||
| sed "s|^${variable}=||" \
|
||||
cd_grep_os__variable="${1}"
|
||||
if [ "${cd_grep_os__variable}" ] ; then
|
||||
grep "^${cd_grep_os__variable}=" "/etc/os-release" \
|
||||
| sed "s|^${cd_grep_os__variable}=||" \
|
||||
| sed "s|^\"\(.*\)\"$|\1|"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue