And your platform is...?

UNIX - use sed and awk