Hacker News new | past | comments | ask | show | jobs | submit login

First off, readelf shouldn't switch between hex and base10. Secondly, that's DSV, so you shouldn't have written a regex for it. You should have either cut, or awk, both tools SPECIFICALLY DESIGNED to do what you want.



What's DSV?


DSV: Delimiter Separated values. readelf uses a delimiter matching the regex /\w+/. In AWK, this is $FS by default, so AWK will parse this by default. Or you can pipe

  tr -s [:blank:] 
To cut, which will give you the row you want.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: