mirror of
https://github.com/zuno/slackpkgplus
synced 2025-01-13 20:01:04 +01:00
Fixed 'grep: write error' bug when running with sudo su -
This commit is contained in:
parent
f26844a3be
commit
a03840cf6a
1 changed files with 2 additions and 1 deletions
|
@ -727,7 +727,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
|||
#
|
||||
PKGDATA=""
|
||||
LINEIDX=""
|
||||
PKGINFOS=$(grep -n "^${DIR} " ${TMPDIR}/pkglist | grep -w "${PAT}" | grep -m 1 "^[[:digit:]]\+:${DIR} ${ARGUMENT} ")
|
||||
grep -n "^${DIR} " ${TMPDIR}/pkglist | grep -w "${PAT}" > ${TMPDIR}/packages.matches
|
||||
PKGINFOS=$(grep -m 1 "^[[:digit:]]\+:${DIR} ${ARGUMENT} " ${TMPDIR}/packages.matches)
|
||||
|
||||
if [ ! -z "$PKGINFOS" ] ; then
|
||||
LINEIDX=$(echo "$PKGINFOS" | cut -f1 -d":")
|
||||
|
|
Loading…
Reference in a new issue