I have a text file just like below
add device 1: /dev/input/event7
name: "evfwd"
add device 2: /dev/input/event6
name: "aev_abs"
add device 3: /dev/input/event5
name: "light-prox"
add device 4: /dev/input/event4
name: "qtouch-touchscreen"
add device 5: /dev/input/event2
name: "cpcap-key"
add device 6: /dev/input/event1
name: "accelerometer"
add device 7: /dev/input/event0
name: "compass"
add device 8: /dev/input/event3
name: "omap-keypad"
4026-275085: /dev/input/event5: 0011 0008 0000001f
4026-275146: /dev/input/event5: 0000 0000 00000000
4026-494201: /dev/input/event5: 0011 0008 00000020
4026-494354: /dev/input/event5: 0000 0000 00000000
what i need to do is i want to remove the add device preambles, i just need the lines starting from 4026-275…
that is,
4026-275085: /dev/input/event5: 0011 0008 0000001f
4026-275146: /dev/input/event5: 0000 0000 00000000
4026-494201: /dev/input/event5: 0011 0008 00000020
4026-494354: /dev/input/event5: 0000 0000 00000000
now this numbers can vary. How can I extract this efficiently. the preambles line numbers are not constant.
Just keep only the lines beginning with a digit.