Replace bc dependency with awk