Volume script refactored with awk and improved