Get all necessary info

Grep and sed with a ugly way.