add script that returns local pci(e) ids

This commit is contained in:
Alexander Grothe 2017-02-28 10:55:35 +01:00
parent efac4618fa
commit c053dcbb0b

View File

@ -0,0 +1,9 @@
#!/bin/bash
# return all vendor:device ids
# typical device path:
# /sys/devices/pci0000\:00/0000\:00\:1f.2/
for device in /sys/devices/pci*/*:*:*/; do
echo "$(cat "$device"/vendor):$(cat "$device"/device)" | sed 's/0x//g'
done