Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 1.41 KB

README.md

File metadata and controls

60 lines (48 loc) · 1.41 KB

Control your loop flow

Pause, resume or stop loops running in a process, from anywhere.

pipeline status gitter chat

loop allows you to control the flow of a loop running in a script or shell process from another script or process.

# in script or shell 1
loop init "my loop name"

i=1
while true; do
  loop control "my loop name"
  echo Iteration $i
  (( i++ ))
  sleep 1
done

echo End
# in script or shell 2
# ...sleep a bit
loop pause "my loop name"
# ...sleep a bit
loop resume "my loop name"
# ...sleep a bit
loop stop "my loop name"

Demo

Installation

Installation is done with basher:

basher install gitlab.com/shellm/loop

Usage

TODO