{"id":17553568,"url":"https://github.com/gavincarr/exec-capture","last_synced_at":"2025-07-23T11:06:19.564Z","repository":{"id":3231686,"uuid":"4267657","full_name":"gavincarr/exec-capture","owner":"gavincarr","description":"Utility to execute a command and capture its output to a given directory","archived":false,"fork":false,"pushed_at":"2012-05-23T00:05:33.000Z","size":112,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T22:40:44.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavincarr.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-09T02:33:27.000Z","updated_at":"2014-09-09T02:06:54.000Z","dependencies_parsed_at":"2022-08-19T02:40:13.730Z","dependency_job_id":null,"html_url":"https://github.com/gavincarr/exec-capture","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gavincarr/exec-capture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincarr%2Fexec-capture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincarr%2Fexec-capture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincarr%2Fexec-capture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincarr%2Fexec-capture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavincarr","download_url":"https://codeload.github.com/gavincarr/exec-capture/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincarr%2Fexec-capture/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266665813,"owners_count":23964974,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2024-10-21T06:42:51.710Z","updated_at":"2025-07-23T11:06:19.538Z","avatar_url":"https://github.com/gavincarr.png","language":"Perl","readme":"NAME\n    exec-capture - utility to execute a command and capture its output to a\n    given directory\n\nSYNOPSIS\n      # usage: exec-capture [options] cmd [args]\n      exec-capture ifconfig\n      exec-capture -N ip_route ip route\n\nDESCRIPTION\n    exec-capture is a simple wrapper utility to search the user's path for\n    an arbitrary command, execute it, and capture its output to a given\n    directory.\n\n    It is intended particularly for use from cron, to run a command\n    periodically and capture its output for aggregation or analysis.\n\n  OPTIONS\n    The following options are supported:\n\n    --help | -h | -?\n        Show usage information.\n\n    --verbose | -v\n        Run with more verbose output (may be repeated).\n\n    --noop | -n\n        Report command output to stdout instead of saving to the capture\n        directory. Implies --verbose.\n\n    --cmd | -C \u003ccmd_path\u003e\n        Command to check for existence before execution. Defaults to the\n        first argument in @ARGV (i.e. the 'cmd' arg), so mostly only useful\n        if you're running a complex (e.g. piped) command line where you want\n        to test something other than the first cmd argument.\n\n    --name | -N \u003cname\u003e\n        Name of the file to be used for capture output in the capture\n        directory. Defaults to the (basenamed) command name (from --cmd, if\n        given, else the first argument in ARGV), so should normally be\n        specified explicitly whenever you're going to run the same command\n        more than once with different arguments, or where you've got a more\n        complex (e.g. piped) command line where the first argument isn't the\n        most important e.g.\n\n            exec-capture -N ip_address ip address\n            exec-capture -N ip_route   ip route\n\n            exec-capture -N blargle 'ls *.txt | blargle'\n\n    --dir | -d \u003cdirectory\u003e\n        Required. The directory to be used to capture output. May also be\n        specified via an EXEC_CAPTURE_DIR environment variable, so that it\n        can be set at the top of a cron job for multiple exec-capture\n        invocations. Default: none.\n\n    --missing-ok | -m\n        Flag to indicate that it is okay for the given command to be\n        missing. If the command is not found in the user's path we just\n        quietly exit instead of raising an error. This allows for cron jobs\n        to include optional exec-capture entries that gracefully exit on\n        hosts where the commands are not found.\n\n    --stderr | -e\n        Also capture stderr output, instead of just stdout.\n\n    --sort | -s\n        Sort output lines before capturing.\n\n    --sub \u003csubstitution\u003e\n        Apply (multiple) perl substitutions to command output before\n        capturing. This is useful, for instance, where you have\n        rapidly-changing data included in your output (e.g. temperatures,\n        traffic statistics, etc.) that you don't want to capture,\n        particularly if your tracking changes via a version control system.\n        e.g.\n\n            # remove RX and TX counter lines from ifconfig output\n            exec-capture --sub 's/^\\s+(RX|TX).*\\n//gm' ifconfig\n\n        May be repeated.\n\nAUTHOR\n    Gavin Carr \u003cgavin@openfusion.com.au\u003e\n\nCOPYRIGHT AND LICENCE\n    Copyright (C) Gavin Carr 2011-2012.\n\n    This library is free software; you can redistribute it and/or modify it\n    under the same terms as Perl itself, either Perl version 5.8.0 or, at\n    your option, any later version of Perl 5.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavincarr%2Fexec-capture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavincarr%2Fexec-capture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavincarr%2Fexec-capture/lists"}