Moved grep pipe to an awk if statement in prompt