Write a command-line tool /root/normalize that reads a single input file and writes to a single output file…
Write a command-line tool /root/normalize that reads a single input file and writes to a single output file…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format detection: - If every non-empty line in the file starts with { and ends with } , treat it as…
The task
**Input format detection:** - If every non-empty line in the file starts with `{` and ends with `}`, treat it as NDJSON. - Otherwise, treat it as CSV. The first non-empty line is the header.
Part of ai-and/termgrade-environments.