csvprintf
brew install csvprintf
v1.3.4
Apache-2.0
Command-line utility for parsing CSV files
6
30-day installs · #9979
21
90-day · #9594
176
365-day · #7679
44
★ GitHub stars · updated 5mo ago
Build dependencies
GitHub topics
command-line-tool
csv
unix
Links
- https://github.com/archiecobbs/csvprintf
- GitHub: archiecobbs/csvprintf
- Brew formula source: Formula/c/csvprintf.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [
"autoconf",
"automake"
],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Command-line utility for parsing CSV files",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:36:44+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "csvprintf",
"github_default_branch": "master",
"github_last_commit_at": "2026-03-01T16:00:36Z",
"github_readme_excerpt": "**csvprintf** is a simple UNIX command line utility for parsing CSV files.\n\n**cvsprintf** works just like the `printf(1)` command line utility. You supply a `printf(1)` format string on the command line and each record in the CSV file is formatted accordingly. Each format specifier in the format string contains a column accessor to specify which CSV column to use, so for example `%3$d` would format the third column as a decimal value.\n\n**csvprintf** can also convert CSV files into XML, JSON, and `bash(1)` variable assignments.\n\nYou can view the [ManPage](https://github.com/archiecobbs/csvprintf/wiki/ManPage) online.\n\n### Examples\n\nGiven this input file `input.csv`:\n\n```\nNAME,ADDRESS,POINTS\nFred Smith,\"1234 Main St.\nAnytown, USA 39103\",123.4567\n\"Wayne \"\"The Great One\"\" Gretsky\", 59 Hockey Lane , 999999\n```\n\nhere is the resulting output:\n\n```\n$ cat input.csv | csvprintf -i \u0027Name: [%1$-24.24s]\\nAddress: [%2$-12.12s]\\nPoints: %3$.2f\\n\u0027\nName: [Fred Smith ]\nAddress: [1234 Main St]\nPoints: 123.46\nName: [Wayne \"The Great One\" Gr]\nAddress: [59 Hockey La]\nPoints: 999999.00\n```\n\nAn example of the XML output:\n\n```\n$ cat input.csv | csvprintf -iX\n\u003c?xml version=\"1.0\" encoding=\"ISO-8859-1\"?\u003e\n\u003ccsv\u003e\n \u003crow\u003e\n \u003cNAME\u003eFred Smith\u003c/NAME\u003e\n \u003cADDRESS\u003e1234 Main St.\nAnytown, USA 39103\u003c/ADDRESS\u003e\n \u003cPOINTS\u003e123.4567\u003c/POINTS\u003e\n \u003c/row\u003e\n \u003crow\u003e\n \u003cNAME\u003eWayne \"The Great One\" Gretsky\u003c/NAME\u003e\n \u003cADDRESS\u003e59 Hockey Lane\u003c/ADDRESS\u003e\n \u003cPOINTS\u003e999999\u003c/POINTS\u003e\n \u003c/row\u003e\n\u003c/csv\u003e\n```\n",
"github_repo": "archiecobbs/csvprintf",
"github_stars": 44,
"github_topics": [
"command-line-tool",
"csv",
"unix"
],
"homepage": "https://github.com/archiecobbs/csvprintf",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 6,
"installs_365d": 176,
"installs_90d": 21,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "Apache-2.0",
"llm_generated_at": null,
"llm_model": null,
"name": "csvprintf",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 9979,
"rank_365d": 7679,
"rank_90d": 9594,
"raw_hash": "9ec53594f1ed467e",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/c/csvprintf.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [
"libxslt"
],
"version_head": null,
"version_stable": "1.3.4",
"versioned_formulae": [],
"why_use_this": null
}