Revert "Using sed instead of awk"

This reverts commit 6b3e0b686d8ee04329b02205b01f5a12679cae99.