rewrite total_lines.pl to total_lines.sh