{"id":20330566,"url":"https://github.com/mle86/csv-parser","last_synced_at":"2026-04-13T08:31:16.775Z","repository":{"id":161260178,"uuid":"72546209","full_name":"mle86/csv-parser","owner":"mle86","description":"A command-line CSV parser that outputs json and other formats.","archived":false,"fork":false,"pushed_at":"2020-01-19T15:54:38.000Z","size":241,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-18T18:30:02.999Z","etag":null,"topics":["c","command-line-tool","csv","csv-parser","filter","json"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mle86.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-01T14:52:18.000Z","updated_at":"2020-01-03T16:46:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"9baf0134-d5e9-4574-82f8-7954d8daa77b","html_url":"https://github.com/mle86/csv-parser","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/mle86/csv-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mle86%2Fcsv-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mle86%2Fcsv-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mle86%2Fcsv-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mle86%2Fcsv-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mle86","download_url":"https://codeload.github.com/mle86/csv-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mle86%2Fcsv-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T06:26:45.479Z","status":"ssl_error","status_checked_at":"2026-04-13T06:26:44.645Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","command-line-tool","csv","csv-parser","filter","json"],"created_at":"2024-11-14T20:16:42.608Z","updated_at":"2026-04-13T08:31:16.753Z","avatar_url":"https://github.com/mle86.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # (This file was autogenerated from the man page with 'make README.md')\n\n# csv(1) - convert csv files to json and other formats\n\n[![Build Status](https://travis-ci.org/mle86/csv-parser.svg?branch=master)](https://travis-ci.org/mle86/csv-parser)\n[![MIT License](https://img.shields.io/badge/license-MIT-498e7f.svg?style=flat)](/LICENSE)\n\n\nVersion 2.6.0, January 2020\n\n\u003cpre\u003e\u003ccode\u003e\u003cb\u003ecsv\u003c/b\u003e [\u003ci\u003eMODE\u003c/i\u003e] [\u003ci\u003eOPTIONS\u003c/i\u003e] [\u003cb\u003e--\u003c/b\u003e] [\u003ci\u003eCOLUMNNAME\u003c/i\u003e...]\u003c/code\u003e\u003c/pre\u003e\n\n\u003ca name=\"description\"\u003e\u003c/a\u003e\n\n# Description\n\nThis program reads CSV from its standard input (_stdin_)\nand outputs the contents in a different format.\n\nCSV (“Comma Separated Values”)\nis a simple, tabular, widely-used data exchange format\nmostly used for textual and numeric data.\nUnfortunately, there are many different implementations.\nThis program aims to be fully RFC\u0026nbsp;4180-compliant\nwhile supporting many common standard\u0026nbsp;violations as well.\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n\n# Installation\n\n```\n$ make\n# make install\n```\n\nThis will compile the binary and copy it to /usr/local/bin/**csv**.\nThe man page will be copied to /usr/local/share/man/man.1/**csv.1.gz**.\n\n\n\n\u003ca name=\"code-standard\"\u003e\u003c/a\u003e\n\n# Code Standard\n\nThe program source is valid ISO **C99**.\nIt sets the `_POSIX_C_SOURCE = 200809L` feature macro for the **getline**(3) function.\nIt also uses the GNU **getopt_long**(3) function.\n\n\n\n\u003ca name=\"input-modes\"\u003e\u003c/a\u003e\n\n# Input Modes\n\nThe program operates in one of several\n**input modes**\nto read its input.  \nThe default input mode is **-a**.\n\n* **-a, --auto-columns**  \n  Automatic column names:\n  Column names will be read automatically from the first CSV line.\n  In this mode, _COLUMNNAME_ specifications are\n  neither needed nor possible.\n  (This is the default mode.)\n* **-n, --named-columns**  \n  Non-fixed, named columns:\n  The program reads column names from the argument list\n  and compares them to the first line of the CSV input,\n  printing only the named columns.\n  Separate column names with a single “**.**” argument!\n  The name order is irrelevant, as is case.\n  See the section\n  “[Named Columns Mode](#named-columns-mode)”\n  below\n  for more information about this input mode.\n* **-g, --assigned-names**  \n  Names assigned to column positions:\n  The program reads column names from the argument list and\n  applies them to all lines.\n  The special name “**@**”\n  causes columns to be ignored.\n  The argument order represents\n  the column order in the CSV input.\n  The input's first line will not be treated specially.\n* **-i, --numbered-columns**  \n  Numbered columns:\n  In this mode,\n  the columns will be automatically numbered,\n  starting from zero.\n  Similar to “**-g 0 1 2 3**...”,\n  but will force the **-j** output mode to print each line\n  as an array instead of an object.\n  Not compatible with **-J** and **-C** output modes.\n  In this mode,\n  _COLUMNNAME_ specifications are\n  neither needed nor possible.\n  The first input line will not be treated specially.\n\n\u003ca name=\"output-modes\"\u003e\u003c/a\u003e\n\n# Output Modes\n\nThe program operates in one of several\n**output modes.**  \nThe default output mode is **-m**.\n\n* **-m, --simple**  \n  Simple output:\n  For every input field, one line will be printed,\n  with the column name, a colon and a space, and the content.\n  Input lines will be separated with an extra line containing only a dash.\n  Backslashes in the input will be replaced with a literal **\\\\\\\\**,\n  while linebreaks in the input will be replaced with a literal **\\\\n**\n  (if the **-b** option is given).\n* **-j, --json**  \n  Long JSON output:\n  An ordered array of input lines is printed.\n  Every line is represented by an object\n  with the column names as keys and the field values as values.\n  (In the **-i** input mode,\n  every line is represented as an ordered array instead.)\n* **-J, --compact-json**  \n  Compact JSON output:\n  An object with a “_columns_” and a “_lines_” key is returned.\n  The “_columns_” entry is an ordered array of the column names.\n  The “_lines_” entry is an ordered array of ordered arrays,\n  each of which represents one input line.\n* **-X, --shell-vars**  \n  Output in shell\u0026nbsp;variable\u0026nbsp;assignment format.\n  See the\n  “[Examples](#examples)”\n  section below.\n* **-C, --csv-output**  \n  Standardized CSV output.\n  See the\n  “[CSV output mode](#csv-output-mode)”\n  section below for more details.\n\n\u003ca name=\"other-options\"\u003e\u003c/a\u003e\n\n# Other Options\n\n\n* **-d** _C_, **--separator** _C_  \n  Use field separator character _C_.\n  The special value “_auto_”\n  causes auto-detection\n  on the first input line\n  (this is the default mode).\n  The special value “_none_”\n  disables separator character detection\n  (use this for single-column input files).\n* **-q** _C_, **--quotes** _C_  \n  Use field quoting character _C_.\n  By default, only doublequotes\u0026nbsp;(**\"**)\n  may be used.\n  The special value “_auto_”\n  causes auto-detection\n  on the first quoted field in the input\n  (recognized quoting characters are \"doublequotes\" and 'singlequotes').\n  The special value “_mixed_”\n  allows the input to use both quoting characters.\n  The special value “_none_”\n  causes all potential enclosure characters to be read as-is.\n* **-b, --allow-breaks**  \n  By default,\n  every record is assumed to span exactly one line.\n  This option allows quoted fields to contain linebreaks,\n  i.e. to span several lines.\n  Without this option,\n  multi-line field values will cause an error.\n  This option causes\n  the **--skip** and **--limit** options\n  to count records instead of lines,\n  which means that you cannot use **--skip** anymore\n  to skip over malformed input lines\n  when using the **-b** option.\n* **-s** _N_, **--skip** _N_  \n  Skip the first _N_ input lines.\n  In modes **-n** and **-a**,\n  skip the first _N_ input lines\n  after the header line.\n  Setting _N_ to zero means no\u0026nbsp;skip,\n  which is the default.\n* **-l** _N_, **--limit** _N_  \n  Stop after the _N_th input line.\n  In modes **-n** and **-a**,\n  the header line is not counted.\n  Setting _N_ to zero removes the limit, which is the default.\n* **-e, --ignore-errors**  \n  Don't stop on encountering malformed CSV input;\n  instead, truncate the current field value and continue.\n  (By default, malformed CSV input\n  terminates the program with exit status 2.)\n  Malformed input includes:\n    * too many columns\n    * overlong fields\n    * unexpected quote characters\n    * unexpected end-of-line (within a quoted field)\n    * unexpected end-of-file (within a quoted field)\n* **--color**[=_WHEN_], **--colour**[=_WHEN_]  \n  Enables or disables colorized output.\n  Possible values for _WHEN_:\n    * **auto**:\n      Colorize output if _stdout_ is a terminal.\n      This is the default setting if the option is missing.\n    * **always**/**force**/**on**:\n      Always colorize the output,\n      even if it's redirected to a file.\n      Useful if the output gets directed to a pager like **less**(1).\n      This is the default if the option is given without _WHEN_.\n    * **never**/**off**:\n      Don't colorize the output.\n* **--trim**[=_MODE_]  \n  Enables or disables input whitespace trimming.\n  Whitespace in this context refers only to tabs (**\\\\t**) and spaces.\n  Possible values for _MODE_:\n    * **lines**/**records**:\n      Removes whitespace from the start and end of every input line.\n      This is the default if the option is given without _MODE_.\n    * **none**/**off**:\n      No whitespace removal.\n      Whitespace at the start/end of a line\n      is considered to be part of the first/last field's value.\n      This is the default setting if the option is missing.\n* **--filter**[=_MODE_]  \n  When filtering is active,\n  the program won't output records\n  it considers “empty”.\n  (Filtered records do not count toward the **--limit** either.)\n  Possible values for _MODE_:\n    * **empty**/**z**:\n      Drops all records\n      that consist of empty-string fields only.\n      This is the default if the option is given without _MODE_.\n    * **blank**/**b**:\n      Drops all records\n      that consist of empty-string or whitespace-only fields only.\n    * **zero**/**0**:\n      Drops all records\n      that consist of zero-valued (“0”, “.000”...) fields only.\n    * **empty-or-zero**/**z0**:\n      Drops all records\n      that consist of zero-valued and/or empty-string fields only.\n    * **blank-or-zero**/**b0**:\n      Drops all records\n      that consist of zero-valued and/or whitespace fields only.\n    * **none**/**off**:\n      No record filtering.\n      This is the default setting if the option is missing.\n* **-F, --flush**  \n  Flush the output after every input line.\n* **-M, --keep-bom**  \n  Don't try to remove UTF-8/16 BOMs from the first line.\n  (By default, the program will strip the BOM from the first line,\n  if there is one.)\n* **-u, --unknowns**  \n  With this option, the **-n** mode will include all unknown columns,\n  like a combination of the **-n** and **-a** modes.\n  (By default, the **-n** input mode will discard all unknown columns.)\n* **-U, --no-unknowns**  \n  With this option, the **-n** mode will output only explicitly named columns.\n  This is the default behavior.\n  The option is the opposite of the **-u** option\n  and has no effect in other input modes.\n* **-h, --help**  \n  Show command line usage information.\n* **-V, --version**  \n  Show program version and licensing information.\n\n\u003ca name=\"named-columns-mode\"\u003e\u003c/a\u003e\n\n# Named Columns Mode\n\nThe **-n** input mode is useful\nif the input column names are known in advance,\nbut not their position.  \nFor example,\ncalling the program with the arguments\n“**-n phone . fax .**”\nwill extract the columns\n“_phone_”\nand “_fax_”\nfrom the input (if they exist),\nregardless of their position.\nAll other columns will be ignored.\n\nThe input mode also supports\n**column aliases**.\nThis is useful if several names with the same meaning\nare acceptable for one column.\nTo use this feature,\nlist the accepted column aliases\nafter the column name.\nThe\u0026nbsp;“**.**”\u0026nbsp;argument\nseparates the column aliases\nfrom the next column definition.  \nFor example,\nthe invocation\n“**-n\u0026nbsp;phone tel telephone telno\u0026nbsp;. fax telefax faxno\u0026nbsp;.**”\nwill again extract the columns \n“_phone_”\nand “_fax_”\nfrom the input\n(and will always call them thus in the output),\nbut will also recognize them\nunder one of several possible name variants.\n\nKeep in mind that the program\nwill do byte-wise string comparisons\nbetween the arguments and the input column names,\nwithout any encoding conversion\nor canonization.\nThe only normalization done\nis lower-casing with **tolower**(3),\nwhich only works on plain ascii letters (A..Z).\n\n\u003ca name=\"csv-output-mode\"\u003e\u003c/a\u003e\n\n# CSV Output Mode\n\nIn CSV output mode (**-C**), the program will print valid CSV.\nIt tries to follow RFC\u0026nbsp;4180 as closely as possible:\nit uses a plain comma as field separator,\nuses CRLF as record separator,\nquotes fields with double-quotes\nand escapes double-quotes in fields by doubling them,\nand only quotes fields that contain a special character.\nLF\u0026nbsp;linebreaks in fields will always be printed as CRLF.\n\nHowever in contrast to RFC\u0026nbsp;4180\nwhich mandates plain 7-bit ASCII input\nand forbids use of control characters below 0x1F,\nthis mode will accept any encoding\nand all special characters\nand output everything as-is.\n\nThis mode may be useful to filter or rename columns in existing CSV files\nand to change unusual separator characters in existing CSV files to the standard comma.\n\nThis mode will remove all NUL bytes from the input.\n\n\u003ca name=\"pretty-printing\"\u003e\u003c/a\u003e\n\n# Pretty-Printing\n\nThe program has limited pretty-printing capabilities:\nif the output (_stdout_) is a tty,\nthe output will be colorized.\nIndentation will not be changed in any way.\n(See the **--color**\u0026nbsp;option\nto force pretty-printing if _stdout_ is not a\u0026nbsp;tty\nor to disable it completely.)\n\n* Column names will be printed in green.\n* Structural elements,\n  such as record separators,\n  will be printed in yellow.\n* Escaped characters\n  will be printed in cyan.\n* Everything else,\n  including the field contents,\n  will be printed in the terminal's default color.\n\n\n\u003ca name=\"examples\"\u003e\u003c/a\u003e\n\n# Examples\n\nAll examples assume this CSV file as input:\n\n\u003cpre\u003e\u003ccode\u003eh1;h2;h3\nc1;c2;c3\nca;\"cb\"\"\";cc\ncx;cy;cz\n\u003c/code\u003e\u003c/pre\u003e\n\nThe default input mode is **-a**\n(get column names automatically from first line).\nThe default output mode is **-m**\n(simple output).\nThis is what is looks like:\n\n**`csv \u003c test.csv`**\n\n\u003cpre\u003e\u003ccode\u003eh1: c1\nh2: c2\nh3: c3\n-\nh1: ca\nh2: cb\"\nh3: cc\n-\nh1: cx\nh2: cy\nh3: cz\n\u003c/code\u003e\u003c/pre\u003e\n\nIn contrast, this is what the **-j** (JSON) output mode\nlooks like with the same input:\n\n**`csv -j \u003c test.csv`**\n\n\u003cpre\u003e\u003ccode\u003e[{\"h1\":\"c1\",\"h2\":\"c2\",\"h3\":\"c3\"}\n,{\"h1\":\"ca\",\"h2\":\"cb\\\"\",\"h3\":\"cc\"}\n,{\"h1\":\"cx\",\"h2\":\"cy\",\"h3\":\"cz\"}]\n\u003c/code\u003e\u003c/pre\u003e\n\nThe **-J** output mode (compact JSON)\nonly prints the column names once:\n\n**`csv -J \u003c test.csv`**\n\n\u003cpre\u003e\u003ccode\u003e{\"columns\": [\"h1\",\"h2\",\"h3\"],\n\"lines\": [\n [\"c1\",\"c2\",\"c3\"]\n,[\"ca\",\"cb\\\"\",\"cc\"]\n,[\"cx\",\"cy\",\"cz\"]]}\n\u003c/code\u003e\u003c/pre\u003e\n\nIn the **-i** input mode,\nthe first line is not considered special.\nInstead, all columns are automatically numbered:\n\n**`csv -i \u003c test.csv`**\n\n\u003cpre\u003e\u003ccode\u003e0: h1\n1: h2\n2: h3\n-\n0: c1\n1: c2\n2: c3\n-\n0: ca\n1: cb\"\n2: cc\n-\n0: cx\n1: cy\n2: cz\n\u003c/code\u003e\u003c/pre\u003e\n\nAs a special case,\nthe long JSON mode\u0026nbsp;(**-j**) omits the auto-numbered column names\nof the **-i** input mode.\nThus,\nan array\ninstead of an object\nwill be printed\nfor every record,\nsimplifying further JSON processing.\n\n**`csv -i -j \u003c test.csv`**\n\n\u003cpre\u003e\u003ccode\u003e[[\"h1\",\"h2\",\"h3\"]\n,[\"c1\",\"c2\",\"c3\"]\n,[\"ca\",\"cb\\\"\",\"cc\"]\n,[\"cx\",\"cy\",\"cz\"]]\n\u003c/code\u003e\u003c/pre\u003e\n\nFinally, the **-X** output mode\ngenerates shell variable assignments\nlike this:\n\n**`csv -X \u003c test.csv`**\n\n\u003cpre\u003e\u003ccode\u003eCSV_COLNAME_0=h1\nCSV_COLNAME_1=h2\nCSV_COLNAME_2=h3\nCSV_0_0=c1\nCSV_0_1=c2\nCSV_0_2=c3\nCSV_1_0=ca\nCSV_1_1=\"cb\\\"\"\nCSV_1_2=cc\nCSV_2_0=cx\nCSV_2_1=cy\nCSV_2_2=cz\nCSV_RECORDS=3\n\u003c/code\u003e\u003c/pre\u003e\n\nThe varname scheme is\n“CSV\\__lineno_\\__fieldno_”,\nwith lines and fields counted from zero.\n\nAgain, there's a special case for the **-i** input mode,\nbecause it has no relevant column names:\nThe “CSV\\_COLNAME\\__colno_” assignments will be omitted,\nand the first input line is read as a regular record.\n\n**`csv -i -X \u003c test.csv`**\n\n\u003cpre\u003e\u003ccode\u003eCSV_0_0=h1\nCSV_0_1=h2\nCSV_0_2=h3\nCSV_1_0=c1\nCSV_1_1=c2\nCSV_1_2=c3\nCSV_2_0=ca\nCSV_2_1=\"cb\\\"\"\nCSV_2_2=cc\nCSV_3_0=cx\nCSV_3_1=cy\nCSV_3_2=cz\nCSV_RECORDS=4\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\u003ca name=\"input\"\u003e\u003c/a\u003e\n\n# Input\n\n\n\u003ca name=\"encoding\"\u003e\u003c/a\u003e\n\n### Encoding\n\nThe program is encoding-agnostic,\nso long as\na single-byte character is used as field separator\nand LF\u0026nbsp;(**\\\\n**) or CRLF\u0026nbsp;(**\\\\r\\\\n**) is used as record separator.\n\nNB:\nSome encodings,\nlike UTF-16 and UTF-32,\nmay use CR/LF bytes\nto represent other characters.\nThis will result in unexpected output,\nsince the program is not wide\u0026nbsp;character-aware.\nPlain ASCII or UTF-8 are safer choices,\nbecause they never use a low byte\nfor the representation of another character.\n\nIt is recommended that input\nin an encoding\nother than plain ASCII or UTF-8\nbe converted to UTF-8\nwith a tool like **iconv**(1)\nbefore being passed to this program.\n\n\u003ca name=\"separator-character\"\u003e\u003c/a\u003e\n\n### Separator Character\n\nBy default,\nthe program will look for a field separator character\nin the first input line;\nthe first such character found there\nwill be used for the rest of the input.\nAccepted separator characters are\ncomma\u0026nbsp;(**,**),\nsemicolon\u0026nbsp;(**;**),\ntabulator\u0026nbsp;(**\\\\t**),\nand\npipe\u0026nbsp;(**|**).\nIf the input uses a different separator character,\nspecify it manually with the **-d** option.\n\nBoth the auto-detection feature\nand the **-d** option\nsupport one-byte separators only\nand assume that the input\ndoes not use more than one distinct separator.\nInput files using multiple different separators\nand/or multibyte separators\ncannot be parsed correctly.\n\n\u003ca name=\"quoting\"\u003e\u003c/a\u003e\n\n### Quoting\n\nBy default, this program recognizes double-quotes (**\"**)\nas the field enclosure character.\nThis can be changed with the **-q** option\nif your input uses a different quoting character.\nThe quoting character\nwill be removed from the output.\nFields need not be quoted,\nexcept for multiple-line values\n(see option **-b**)\nor fields containing the separator or quoting character.\nIf the quoting character\nis present inside a quoted field,\nit must be doubled.\n\nFor example,  \n**\"field\"\"with\"\"quotes\"**\nwill be interpreted as **field\"with\"quotes**,\nwhereas  \n**field\"\"without\"\"quotes\"**\nwill be interpreted as-is.\n\nThe special setting **-q\u0026nbsp;mixed**\nallows input files\nto use both single-quotes (**'**)\nand double-quotes (**\"**)\nas field enclosures.\n\n\u003ca name=\"single-column-csv-files\"\u003e\u003c/a\u003e\n\n### Single-Column CSV Files\n\nSingle-column files can be used as input,\nbut the separator auto-detection\n(in case of “**-d auto**”\nor no **-d** argument at all)\nwill fail and terminate the program\nwith exit\u0026nbsp;code\u0026nbsp;3.\n\nTo correctly read single-column files,\nuse “**-d none**”,\nwhich tells the program\nthat the input does not contain any actual separator characters.\n\nAlternatively, use the **-e** option,\nas a missing separator character can be ignored;\nhowever, this will cause malformed CSV input to be ignored as well.\n\n\u003ca name=\"multi-line-column-names\"\u003e\u003c/a\u003e\n\n### Multi-Line Column Names\n\nIf the first input field contains linebreaks,\nthe automatic separator\u0026nbsp;detection\nwon't be able to find the separator\nand terminate the program\nwith exit\u0026nbsp;code\u0026nbsp;3,\nas it only checks the first input line.\nIn this case, it is necessary\nto manually specify the separator character\nwith the **-d**\u0026nbsp;option.\n\n\u003ca name=\"exit-codes\"\u003e\u003c/a\u003e\n\n# Exit Codes\n\nBy default,\nthe program will terminate with exit code zero (success).\nOther exit codes\nsignify various error conditions:\n\n* **1**\n  Syntax error\n  (invalid arguments, missing, or too many column names).\n* **2**\n  Input format error\n  (too many columns,\n  no column match,\n  empty header line,\n  unexpected quote/EOL/EOF).\n  Note that when the program exits with code\u0026nbsp;2,\n  it will already have printed parts of the CSV contents.\n* **3**\n  No separator found on first line.\n* **4**\n  Empty input.\n  (This is only an error in input modes **-n** and **-a**,\n  whereas input modes **-g** and **-i** can handle empty input gracefully.)\n* **10**\n  Internal error\n  (out of memory or getline(3) read error).\n\n\u003ca name=\"license\"\u003e\u003c/a\u003e\n\n# License\n\n[MIT](https://opensource.org/licenses/MIT)\n\n\u003ca name=\"author\"\u003e\u003c/a\u003e\n\n# Author\n\nMaximilian Eul \u0026lt;[maximilian@eul.cc](mailto:maximilian@eul.cc)\u0026gt;\n(https://github.com/mle86)\n\n\u003ca name=\"standards\"\u003e\u003c/a\u003e\n\n# Standards\n\nY.\u0026nbsp;Shafranovich,\n_Common Format and MIME Type for Comma-Separated Values (CSV) Files_,\n[RFC\u0026nbsp;4180](https://tools.ietf.org/html/rfc4180),\nOctober 2005.\n\nT.\u0026nbsp;Bray,\n_The JavaScript Object Notation (JSON) Data Interchange Format_,\n[RFC\u0026nbsp;7159](https://tools.ietf.org/html/rfc7159),\nMarch 2014.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmle86%2Fcsv-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmle86%2Fcsv-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmle86%2Fcsv-parser/lists"}