Combine cut tail and sed into 1 awk statement