{"id":19584402,"url":"https://github.com/gpalleschi/csvutil","last_synced_at":"2026-06-04T23:31:14.777Z","repository":{"id":95881004,"uuid":"351020487","full_name":"gpalleschi/csvutil","owner":"gpalleschi","description":"CSVutil.sh is a very simple but effective bash shell to manage csv files by command line and generate output on stdout or file.","archived":false,"fork":false,"pushed_at":"2021-03-31T10:04:02.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-26T12:42:42.667Z","etag":null,"topics":["bash","bash-script","csv","csv-format","csv-parsing","csv-reader","extract","regular-expression","shell-script","tool","utility"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gpalleschi.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-03-24T09:30:54.000Z","updated_at":"2023-06-10T06:46:51.000Z","dependencies_parsed_at":"2023-03-05T13:15:16.323Z","dependency_job_id":null,"html_url":"https://github.com/gpalleschi/csvutil","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gpalleschi/csvutil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpalleschi%2Fcsvutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpalleschi%2Fcsvutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpalleschi%2Fcsvutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpalleschi%2Fcsvutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpalleschi","download_url":"https://codeload.github.com/gpalleschi/csvutil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpalleschi%2Fcsvutil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33924832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bash","bash-script","csv","csv-format","csv-parsing","csv-reader","extract","regular-expression","shell-script","tool","utility"],"created_at":"2024-11-11T07:48:04.002Z","updated_at":"2026-06-04T23:31:14.772Z","avatar_url":"https://github.com/gpalleschi.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSVutil\r\n\r\n## Description\r\n**CSVutil.sh** is a very effective bash shell to manage csv files by command line.  \r\nScript permits to extract, remove, change separator, print and filter record from a csv file, all results will be generated in stdout or on a file.  \r\n\r\nUse: `CSVutil.sh \u003cCSV File Name\u003e (options)`  \r\n\r\nParameters `(...)` are optional  \r\nParameters `\u003c...\u003e` are mandatory   \r\n\r\n\u003ctable\u003e\r\n    \u003ctr style=\"background-color:#A9A9A9\"\u003e\r\n        \u003ctd width=\"30%\" style=\"text-align:center;color:black;font-weight:bold;border:1px solid black\"\u003eOption\u003c/td\u003e\r\n        \u003ctd style=\"text-align:center;color:black;font-weight:bold;border:1px solid black\"\u003eDescription\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-h]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eDisplay an Help\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-s(Separaror)]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eTo set field separator {default is ;}\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-e(Columns To Extract)]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eList of columns to extract separated by , or a range of columns separated by - {example -e1,4,8-11 extract columns numbered 1 and 4 and from 8 to 11}\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-r(Columns To Extract)]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eList of columns to remove separated by , or a range of columns separated by - {example -r1-3,5 remove columns numbered from 1 to 3 and 5}\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-d]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eDebug Mode\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-c(New CSV Separator)]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eSpecify a new CSV separator\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-f(Filter Condition)]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eFilter Condition is composed by number column and a regular expression diveded each other by : {example -f2:^Ab Filter will be apply at column 2 and if is true (starts with Ab) record will be filtered} You can specify more filter options and will be related each other in and condition\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-o(File Name Output)]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eFile Name Output to generate instead stdout\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-ff(File Name Filtered)]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eFile Name where are generated all filtered record in original format\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-t]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eThis option indicate that first row of csv file contains columns titles used specify with -v option\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd width=\"30%\" style=\"font-weight:bold;border:1px solid black\"\u003e[-v(separator)]\u003c/td\u003e\r\n        \u003ctd style=\"border:1px solid black\"\u003eThis option is used to show all records with a row for field, you can specify a separator between fields printed {default values is ;}\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n\r\nIt's important clarify that for options -e, -r and -f column number start from 1.  \r\n\r\nExample of executions :  \r\n\r\n\r\n**CSVutil.sh filetest.csv -e1,3,6-8 -c,**                  [This execution extract from file filetest.csv columns 1,3 and from 6 to 8 and replace separator from ; to , and generate output in stdout].  \r\n\r\n**CSVutil.sh filetest.csv -r4,7 -o./filetestRemoved.csv**  [This execution remove from file filetest.csv column 4 and 7 and generate output on file filetestRemoved.csv].  \r\n\r\n**CSVutil.sh filetest.csv -f3:^Oct -ff./fileFiltered.csv** [This execution filter from filetest.csv all record where in column 3 start with Oct and generate a new file with record filtered and record not filtered are printed in stdout].  \r\n\r\n\r\n### Prerequisites  \r\n\r\nNone  \r\n\r\n## Built With  \r\n\r\n* [Visual Code Editor](https://code.visualstudio.com)   \r\n\r\n## Authors  \r\n\r\n* **Giovanni Palleschi** - [gpalleschi](https://github.com/gpalleschi)  \r\n\r\n## License\r\n\r\nThis project is licensed under the GNU GENERAL PUBLIC LICENSE 3.0 License - see the [LICENSE](LICENSE) file for details  \r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpalleschi%2Fcsvutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpalleschi%2Fcsvutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpalleschi%2Fcsvutil/lists"}