Skip to content
/ wtch Public

Periodically executes specified system command

Notifications You must be signed in to change notification settings

ixalender/wtch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wtch

Periodically executes specified system command.

Why?!

It's a simpler variant of watch(1) Linux util, but with needed milliseconds interval and numbered repeat feature.

Usage

wtch [global options] help | "system command with args"

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --interval value, -i value  interval in milliseconds (default: "1000")
   --repeat value, -r value    times to repeat (default: 0 - infinity) (default: "0")
   --help, -h                  show help (default: false)
   --version, -v               print the version (default: false)

Example

$ wtch -i 500 "df -h"
2022/04/27 21:28:14 'df -h' every 500 millisecond
Filesystem       Size   Used  Avail Capacity iused     ifree %!i(MISSING)used  Mounted on
/dev/disk1s1s1  113Gi   23Gi   30Gi    44%! (MISSING)314738560    0%!/(MISSING)
devfs           194Ki  194Ki    0Bi   100%! (MISSING)        0  100%!/(MISSING)dev
/dev/disk1s4    113Gi  4.0Gi   30Gi    12%! (MISSING)314738560    0%!/(MISSING)System/Volumes/VM
/dev/disk1s2    113Gi  286Mi   30Gi     1%! (MISSING)314738560    0%!/(MISSING)System/Volumes/Preboot
/dev/disk1s6    113Gi  103Mi   30Gi     1%! (MISSING)314738560    0%!/(MISSING)System/Volumes/Update
/dev/disk1s5    113Gi   54Gi   30Gi    65%! (MISSING)314738560    0%!/(MISSING)System/Volumes/Data
map auto_home     0Bi    0Bi    0Bi   100%   /System/Volumes/Data/home
/dev/disk1s1    113Gi   23Gi   30Gi    44%! (MISSING)314738560    0%!/(MISSING)System/Volumes/Update/mnt1

About

Periodically executes specified system command

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages