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
|
||||
cat "${src}" |
|
||||
while read -r line; do
|
||||
if grep "${line}" "${dest}" > /dev/null 2>&1; then
|
||||
if grep -q "${line}" "${dest}"; then
|
||||
continue
|
||||
fi
|
||||
cat "${src}" >> "${dest}"
|
||||
|
|
|
@ -5,5 +5,5 @@ set -e
|
|||
# main
|
||||
group="_portzap"
|
||||
mygroups=$(id -Gn | tr ' ' '\n')
|
||||
echo "${mygroups}" | grep -e "^${group}$" > /dev/null 2>&1
|
||||
echo "${mygroups}" | grep -qe "^${group}$"
|
||||
exit "${?}"
|
||||
|
|
Loading…
Reference in a new issue