Issue #1240: replaced cut with awk