This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Locking from: https://gist.github.com/jpclipffel/0b8f470be029fc9e3f07 | |
# Run two bash commands in sequence using flock to prevent | |
# from running multiple instances in paralell | |
# ./sequenced.sh -g echo 'Hello' > test.txt -t cat test.txt -n lock_name | |
while getopts 1:2:n: flag; do | |
case "${flag}" in | |
1) FIRST_CMD=${OPTARG} ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.util.parsing.combinator.JavaTokenParsers | |
object Test extends App with ExprParsers2 { | |
println(eval(parseAll(expr, "1+1-2*3").get)) | |
} | |
trait ExprParsers1 extends JavaTokenParsers { |