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
Try using grep:
grep
lspci -s 0a.00.1 | grep -o ....$
This will print last 4 characters of every line.
However if you'd like to have last 4 characters of the whole output, use tail -c4 instead.
tail -c4