Silence grep with -q
This commit is contained in:
parent
c2ee102218
commit
340576fd0b
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ src="${sharedir}"/doas.conf
|
||||||
dest="${localbase}"/etc/doas.conf
|
dest="${localbase}"/etc/doas.conf
|
||||||
cat "${src}" |
|
cat "${src}" |
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
if grep "${line}" "${dest}" > /dev/null 2>&1; then
|
if grep -q "${line}" "${dest}"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
cat "${src}" >> "${dest}"
|
cat "${src}" >> "${dest}"
|
||||||
|
|
|
@ -5,5 +5,5 @@ set -e
|
||||||
# main
|
# main
|
||||||
group="_portzap"
|
group="_portzap"
|
||||||
mygroups=$(id -Gn | tr ' ' '\n')
|
mygroups=$(id -Gn | tr ' ' '\n')
|
||||||
echo "${mygroups}" | grep -e "^${group}$" > /dev/null 2>&1
|
echo "${mygroups}" | grep -qe "^${group}$"
|
||||||
exit "${?}"
|
exit "${?}"
|
||||||
|
|
Loading…
Reference in a new issue