I have a script that is running and uses
lspci -s 0a.00.1
This returns
0a.00.1 usb controller some text device 4dc9
Using sed:
sed
lspci -s 0a.00.1 | sed 's/^.*\(.\{4\}\)$/\1/'
Output:
4dc9