This patch fixes a bug when a list is created from repeated args --- a/scripts/pcidev 2016-04-22 14:32:51.051934763 +0200 +++ b/scripts/pcidev 2016-04-22 14:34:09.827931789 +0200 @@ -69,27 +69,27 @@ ONLYNEW=1 ;; -ov) - ONLYVID[${#ONLYVID}]="|$(printf "%04x" 0x$2)|" + ONLYVID[${#ONLYVID[*]}]="|$(printf "%04x" 0x$2)|" shift ;; -op) - ONLYPID[${#ONLYPID}]="|$(printf "%04x:%04x" 0x${2%:*} 0x${2#*:})|" + ONLYPID[${#ONLYPID[*]}]="|$(printf "%04x:%04x" 0x${2%:*} 0x${2#*:})|" shift ;; -om) - ONLYMOD[${#ONLYMOD}]="|$2|" + ONLYMOD[${#ONLYMOD[*]}]="|$2|" shift ;; -ev) - EXCLVID[${#EXCLVID}]="|$(printf "%04x" 0x$2)|" + EXCLVID[${#EXCLVID[*]}]="|$(printf "%04x" 0x$2)|" shift ;; -ep) - EXCLPID[${#EXCLPID}]="|$(printf "%04x:%04x" 0x${2%:*} 0x${2#*:})|" + EXCLPID[${#EXCLPID[*]}]="|$(printf "%04x:%04x" 0x${2%:*} 0x${2#*:})|" shift ;; -em) - EXCLMOD[${#EXCLMOD}]="|$2|" + EXCLMOD[${#EXCLMOD[*]}]="|$2|" shift ;; -*)