Reply to Message

Reply to Message

View discussion in a popup

Replying to:
noprompt
1 Nickel

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

Thanks dynamo, my sed/perl is not good enough I guess (I don't even really see what the $d does in your note above though I see that it works!). I think your approach looks great though, so if either of these pages give an obvious clue on how to extract the multiline part that would be appreciated:

http://austinmatzko.com/2008/04/26/sed-multi-line-search-and-replace/

http://unix.stackexchange.com/questions/26284/how-can-i-use-sed-to-replace-a-multi-line-string

http://stackoverflow.com/questions/1221245/sed-multiline-replace

http://askubuntu.com/questions/347223/sed-substitute-through-a-sentence-on-multiple-lines

These are more for replacing a multiline piece of text of course, but hopefully also applicable to picking out the region of text with multiline starting point of:

"Device Physical Name     : <some value><NEWLINE>Physical /Device Symmetrix Name    : <symdev ID>"

0 Kudos