Silence grep with -q

This commit is contained in:
0x1eef 2024-08-17 18:14:07 -03:00
parent c2ee102218
commit 340576fd0b
2 changed files with 2 additions and 2 deletions

View file

@ -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}"

View file

@ -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 "${?}"