The cut command can take a file as an input.
https://github.com/koalaman/shellcheck/wiki/SC2002
Signed-off-by: Rosen Penev <rosenp@gmail.com>
echo $gid
return
fi
- gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
+ gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group)
gid=65536
while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
gid=$((gid + 1))
local shell="${6:-/bin/false}"
local rc
[ -z "$uid" ] && {
- uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3)
+ uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd)
uid=65536
while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do
uid=$((uid + 1))