noprompt
1 Nickel

Re: Extract a block of text with sed/awk/grep from symdev list -v output?

Hi dynamox, I want to extract all information for the device, i.e. *everything* that is in the record for the device 00DA, i.e. exactly equivalent to running: symdev -sid XXXX show 00DA. Of course, symdev -sid XXXX list -v   contains every "show" record one after another. using grep -B 3 -w 00DA, will just get the line with 00DA, and the 3 lines before that.

Can you think of a way, that would extract (from a list -v), the entirety of the information for device 00DA ? (so everything in -B 3 -w 00DA, but also every line *after* 00DA right down to the start of the next device record)

0 Kudos