def _check_file(f, columns):
  """Return shell commands for testing file 'f'."""
  # We write information to stdout. It will show up in logs, so that the user
  # knows what happened if the test fails.
  return """
echo Testing that {file} has at most {columns} columns...
grep -E '^.{{{columns}}}' {path} && err=1
echo
""".format(columns=columns, path=f.path, file=f.short_path)