{"id":27876918,"url":"https://github.com/ethauvin/dcat","last_synced_at":"2026-04-10T07:38:09.799Z","repository":{"id":61973107,"uuid":"415448440","full_name":"ethauvin/dcat","owner":"ethauvin","description":"Concatenate file(s) to standard output.","archived":false,"fork":false,"pushed_at":"2023-12-15T21:16:29.000Z","size":147,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T17:46:29.437Z","etag":null,"topics":["android","cat","concat","concatenate","dart","flutter","ios","linux","macos","windows"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethauvin.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":"2021-10-10T00:08:10.000Z","updated_at":"2025-03-17T19:09:06.000Z","dependencies_parsed_at":"2024-08-22T23:14:32.635Z","dependency_job_id":"7da613dd-4266-42d5-a04f-794c9a58f9c4","html_url":"https://github.com/ethauvin/dcat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ethauvin/dcat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethauvin%2Fdcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethauvin%2Fdcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethauvin%2Fdcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethauvin%2Fdcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethauvin","download_url":"https://codeload.github.com/ethauvin/dcat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethauvin%2Fdcat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273958662,"owners_count":25198090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"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":["android","cat","concat","concatenate","dart","flutter","ios","linux","macos","windows"],"created_at":"2025-05-05T02:53:56.864Z","updated_at":"2025-10-10T21:33:21.257Z","avatar_url":"https://github.com/ethauvin.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?logo=open-source-initiative\u0026logoColor=white)](https://opensource.org/licenses/BSD-3-Clause)\n[![GitHub CI](https://github.com/ethauvin/dcat/actions/workflows/dart.yml/badge.svg)](https://github.com/ethauvin/dcat/actions/workflows/dart.yml)\n[![codecov](https://codecov.io/gh/ethauvin/dcat/branch/master/graph/badge.svg?token=9PC4K4IZXJ)](https://codecov.io/gh/ethauvin/dcat)\n[![pub package](https://img.shields.io/pub/v/dcat.svg?logo=dart)](https://pub.dev/packages/dcat)\n\n# dcat: Concatenate File(s) to Standard Output or File\n\nA [Dart](https://dart.dev/) command-line and library implementation of the standard **cat** Unix utility, inspired by the [Write command-line apps sample code](https://dart.dev/tutorials/server/cmdline).\n\n## Synopsis\n\n**dcat** sequentially reads files, or standard input if none are given, writing them to standard output or file.\n\n## Command-Line Usage\n\n```console\ndcat --help\n```\n\n```text\nUsage: dcat [OPTION]... [FILE]...\nConcatenate FILE(s) to standard output.\n\nWith no FILE, or when FILE is -, read standard input.\n\n  -A, --show-all                 equivalent to -vET\n  -b, --number-nonblank          number nonempty output lines, overrides -n\n  -e, --show-nonprinting-ends    equivalent to -vE\n  -E, --show-ends                display $ at end of each line\n  -h, --help                     display this help and exit\n  -n, --number                   number all output lines\n  -t, --show-nonprinting-tabs    equivalent to -vT\n  -T, --show-tabs                display TAB characters as ^I\n  -s, --squeeze-blank            suppress repeated empty output lines\n  -v, --show-nonprinting         use ^ and M- notation, except for LFD and TAB\n      --version                  output version information and exit\n\nExamples:\n  dcat f - g  Output f's contents, then standard input, then g's contents.\n  dcat        Copy standard input to standard output.\n  ```\n\n## Compile Standalone Application\n  \n### Linux / MacOS\n\n```console\ndart compile exe -o bin/dcat bin/dcat.dart\n```\n\n### Windows\n\n```console\ndart compile exe bin/dcat.dart\n```\n\n## Library Usage\n\n```console\ndart pub add dcat\n```\n\n```dart\nimport 'package:dcat/dcat.dart';\n\nfinal result = await cat(['path/to/file', 'path/to/otherfile]'],\n    File('path/to/outfile').openWrite());\nif (result.isFailure) {\n  for (final error in result.errors) {\n    print('Error: ${error.message}');\n  }\n}\n```\n\n[View Full Instructions](https://pub.dev/packages/dcat/install)\n\nThe `cat` function supports the following parameters:\n\nParameter        | Description                   |  Type\n:--------------- |:----------------------------- | :-------------------\npaths            | The file paths.               | String[]\noutput           | The standard output or file.  | [IOSink](https://api.dart.dev/dart-io/IOSink-class.html)\ninput            | The standard input.           | [Stream](https://api.dart.dev/dart-io/Stdin-class.html)\nshowEnds         | Same as `-e`                  | bool\nnumberNonBlank   | Same as `-b`                  | bool\nshowLineNumbers  | Same as `-n`                  | bool\nshowTabs         | Same as `-T`                  | bool\nsqueezeBlank     | Same as `-s`                  | bool\nshowNonPrinting  | Same as `-v`                  | bool\n\n* `paths` and `output` are required.\n* `output` should be an [IOSink](https://api.dart.dev/dart-io/IOSink-class.html) such as `stdout` or a [File](https://api.dart.dev/dart-io/File/openWrite.html) stream.\n* `input` can be [stdin](https://api.dart.dev/dart-io/Stdin-class.html).\n\nThe remaining optional parameters are similar to the [GNU cat](https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html#cat-invocation) utility.\n\nA `CatResult` object is returned which contains the `exitCode` (`exitSuccess` or `exitFailure`) and `errors`, if any:\n\n```dart\nfinal result = \n    await cat(['path/to/file'], stdout, showLineNumbers: true);\nif (result.exitCode == exitSuccess) { // or result.isSuccess\n  // ...\n} else {\n  for (final error in result.errors) {\n    stderr.writeln(\"Error with '${error.path}': ${error.message}\");\n  }\n}\n```\n\n[View Full Example](https://github.com/ethauvin/dcat/blob/master/example/example.dart)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethauvin%2Fdcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethauvin%2Fdcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethauvin%2Fdcat/lists"}