sed magic: a simple guide
Posted by: nico on
Sep 24th, 2009 |
Filed under: Console, Programming
Anyway, this is the part of the script I came up with to get the enum elements:
cat enum_definition.h | sed -n ‘/enum OID/,/\}\;/ s/\(.*\)/\1/p’
Nice voodoo, isn’t it? How the hell are you supposed to understand that? Well, you’re not, sed is write-only-code, but you can try reading http://www.grymoire.com/Unix/Sed.html#toc-uh-25, a great sed introduction.
Have fun!



Add A Comment