Use 'read' built-in instead of $(cat ... | head -n1)