No description
init-state | ||
LICENSE | ||
load-state | ||
README.md | ||
save-state |
execline-state
in spite of skarnet's "execline maintains no state"
a simple shift register built on piperw(1)
usage
init-state <name>
load-state <name> <target>
save-state <name> <value>
#!/bin/execlineb
init-state flip
save-state flip "up"
forstdin -E line
load-state flip current
println "! state: $current"
ifelse { s6-test "$line" = "flip" } {
println "! flipping state"
ifelse { s6-test "$current" = "up" } {
save-state flip "down"
}
save-state flip "up"
}
save-state flip "$current"