There are no reviews yet. Be the first to send feedback to the community and the maintainers!
WHEN(1) NAME when - repeatedly runs a command, then another when the first succeeds SYNOPSIS when [-n <seconds>] [-t|-z] [-h] [-v] <conditional> <command> DESCRIPTION when runs conditional every N seconds awaiting for "success." Success is defined in one of two ways. In timebomb mode, -t, success is defined by whether or not the conditional is still running after N seconds (as specified by the -n flag). In zero mode, -z, success is achieved when conditional exits with a return value of 0. The -n flag allows the interval to be set (in seconds) between successive attempts at running the conditional when will run until interrupted, or command completes. OPTIONS -h Prints the help message and exits successfully. -n seconds Sets the interval for running the conditional to seconds In timebomb mode, the specified time in seconds will need to pass before the conditional succeeds. -t Sets the success mode to timebomb which succeeds after conditional has been running for at least seconds -v Prints the version and exits successfully. -V Turns on verbose output. Mostly useful for debugging purposes. -z Sets the success mode to zero which succeeds after conditional returns 0 the first time. The conditional is guaranteed to be run at most 1 time every seconds NOTE Note that both conditional and command are given to "sh -c" which means that you may need to use extra quoting to get the desired effect. Note that POSIX option processing is used (i.e., option processing stops at the first non-option argument). This means that flags after conditional don't get interpreted by when itself. EXIT STATUS when makes an effort to exit with the exit status returned by the conditional in timebomb mode. In zero mode the exit status should be, well, 0. EXAMPLES TODO more examples needed Suppose you have a failing build, xmessage will alert you when it succeeds. when "make" "xmessage 'hurrah, build passed'" Or you want to say hello to john when he logs on when "w | grep john" "echo 'hello, john' | write john" Or maybe you have a daemon failing in a tight loop due to misconfiguration or lack of resources. One can run it with when and be alerted to when it becomes happy when -n 10 -t "<failing daemon>" "xmessage 'daemon running'" SEE ALSO watch(1) COPYRIGHT Copyright (C) 2013 Andrew Gwozdziewycz This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/> AUTHOR when was written by Andrew Gwozdziewycz <[email protected]> in 2013 2013 Dec 10 WHEN(1)
wipes
Pipe text to a WebSocket servernyanbar
Nyan Cat progress bar!django-favorites
Generic favorites app for django with some more utilities that make it a bit more plugablegrapt
simple charting tools for unix.slideshow-simple
Easier slideshows using Racket's slideshow toolmvn-el
helpers for working with maven via emacs (derives from ant-el)app-script-game-of-life
Game of Life for Google Spreadsheetsemacs-config
My emacs configheroku-buildpack-tor
Run a tor hidden service on Herokupatter
`go test -v` transformer to provide TAP outputmusniper
Snipe RSVPs on popular Meetup groupstimer
Lightning talk timerheproxy
An HTTPS Everywhere proxy for plugin incompatible browsers, and everywhere else.ant-el
Helpers for using ant with emacsunipoint
emacs minor mode for quickly entering mathematics related unicode codepointschatter
chatter bot framework inspired by eliza for Guileenvjson
Runs a program in a modified environment, specified via JSON.tech-blogs-you-should-read
This is ultimately an OPML file of tech blogs you should read. Ever changing (hopefully)!recat
Replay log files in simulated real-timemore-modest
Makefile powered blogphizer
dynamic photo resizing proxycfdg
A language, inspired by CFDG, using Racketmuxtube
like the original muxtape, only with youtube videosthumb-through
quickly read an article from emacsscanabanana
It's peanut butter jelly time.hisp
a simple lisp interpreter written in Haskellbitdb
a stupidly hacky key value store on top of bit.lysoftserv
clojure lib inspired by contrib/socket-server for making thread pooled serverscatchgold
ncurses based tax evasion gamehack-and-tell-web
hackandtell.orgactivator-el
init for emacscasemaker
helps you create simple test casesabstractina
implementations of abstract machines in pythonenvbreach
Fill your environment with Vault secretsbangbangcon
!!Con talk and supporting things.nyar
command line progress barturbobtn
It's like the early 90s again, but for modern Linux machines.old-sigusr2.net
my blogsigusr2.net
My blog! http://sigusr2.netapg.github.com
github page!qryp
It's just like grep, but with query capabilities. See also apg/lack (In progress, or lack there of)denote
demise ate the cheese.text-please
Text Please!bf
A brainfuck interpreter (and studio)fn-php
functional primitives for php 5.3+angmines
Minesweeper using angular.jsubergator
occupy internet data for redistribution aggregatorastheygrow
you'll seelein-envclasspath
add $CLASSPATH to lein's classpath (yes, this shouldn't be necessary)python-worlds
A hack attempt at building Alessandro Warth's Worlds in Pythontweetmap
character map for twitter as a chrome extensionasteroidfight
asteroids deathmatchsamegame
samegame in clojureln
The Natural Logger for Goquickpass
quick password managersurd
an absurd lisp interpreteranglife
Life in Angular JSchibi-apg-unveil
unveil(2), from OpenBSD, in Chibi Scheme!turnon
stupid typing visualizationlack
yet another yak shavenibl
a tiny graphics enginejubil
The jubil programming languageapgwoz.com
bucket
Implementations of Leaky and Token bucket for Go.stationary
Another stupid static site generator. I swear it'll be useful.dwm
my fork of dwm with patches applied, etc.slashreading.org
a public repo forhidden-polls
Simple polling app that can run with the tor-hidden-service buildpack!fifh
yet another forth interpreter +1 me too!racket-con-2017
slideshow/simple source for my Racket Con 2017 presentation.clj-docup
A simple document markup without the gobbledegooklc
musings with fnparse by implementing a simple untyped lambda calculus reducerdregex
implementation of derivative regular expression matcherdotfiles
config files and suchlogflect
logplex tails as a service via drains.websheet
bookmarklet to make any table on the web a spreadsheetlpxgen
Logplex test generatorlife
game of life in clojurekeyfavors
A simple way to sign a bunch of keyssokoduino
Sokoban for arduino.emacs-connect
Connect to an emacs server, or just fucking start one.hassle
A Lisp powered game framework, that's almost certainly too much of a hassle to actually usecanoe
Create a canoe out of log files and chisels, and send them down some routes!basin
the start of a generic heroku HTTPS drains framework...flenv
Go flag + envdecodemuprsvps
visualization of streaming api RSVPs on meetup.comrequire
for when you require a module in python and there are weird circumstances around the environmentLove Open Source and this site? Check out how you can help us