Skip to main content

A CLI tool to watch for command outputs and store them to a file for further analysis

Project description

Command Watcher Python Badge Downloads Downloads

cmdwatch is a CLI tool to watch the output of a given command until certain conditions given by the user are satisfied. The conditions can be

  1. There is a change in output
  2. When the time limit exceeds

The output of the command will be shown in the console as well.

pip install cmdwatch

Usage

$ cmdwatch -d DELAY [-o OUTPUT_FILE] [-t TIMEOUT] [-s] <cmd>

Command Watcher Tool

optional arguments:
  -h, --help            show this help message and exit
  -d DELAY, --delay DELAY
                        How long to wait until next execution
  -o OUTPUT_FILE, --output OUTPUT_FILE
                        File where the output should be stored
  -t TIMEOUT, --timeout TIMEOUT
                        For how many second should i watch
  -s, --stop            Pass this option if you want to stop checking whenever
                        there is a difference in output

If you want to store the command outputs to a file then pass the --output/-o with the file name

Example:

$ cmdwatch -d 2 -o ping_check.txt ping google.com

Above usage will execute the "ping google.com" command every 2 seconds and stores the output into file ping_check.txt

If you want to stop the execution when there is a change in the output then pass --stop/-s option

Example:

$ cmdwatch -d 2 -o ping_check.txt -s ping google.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmdwatch-0.0.6.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmdwatch-0.0.6-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file cmdwatch-0.0.6.tar.gz.

File metadata

  • Download URL: cmdwatch-0.0.6.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

File hashes

Hashes for cmdwatch-0.0.6.tar.gz
Algorithm Hash digest
SHA256 ef81bb3443f0e72e04bb777bf99db7d8a814e98d05f3a3e4063548e57b141779
MD5 7847312a138ca97fd96219ce91083c7f
BLAKE2b-256 45b03951275719118fd11189284a30d0ae5837f6e9fa39629604c0730d9cb4c0

See more details on using hashes here.

File details

Details for the file cmdwatch-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: cmdwatch-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

File hashes

Hashes for cmdwatch-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b58f512deac071140d3618771ce8ca69a7aa42333b4f2940298787f0d9c2e1a8
MD5 4afd21fd5a51548b418220b46c69ba75
BLAKE2b-256 628a6e141c187fd9ed9b9c43ec6e81ed40605b836f9e05b4f99f97e990e3e8cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page