Pcornel
Automation · Data Formats › CSV

Rows

Cheat sheet · https://pcornel.dk/topic.php?topic=5836

Back to the Topic

Answer

CSV rows are records, one per line after the header. Validate each row in automation and report bad ones by line number instead of failing the whole import silently.

Remember

  • Each row is one record.
  • Validate every row before acting.
  • Report invalid rows by line number.

First checks

  • wc -l file.csv — row count
  • awk -F, '{print NF}' file.csv | sort | uniq -c — fields per row (simple files)
  • Header row present — structure

Verify in this order

row → fields → record

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5836

Confirmation

Confirm action

Continue?