Fix special characters interferng in scripts

This commit is contained in:
1computer1 2019-06-01 01:04:15 -04:00
parent 20a2199bbf
commit 2f38bc640c
25 changed files with 29 additions and 29 deletions

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.apl printf %s "$1" > program.apl
apl --OFF -s -f program.apl apl --OFF -s -f program.apl
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.sh printf %s "$1" > program.sh
bash program.sh bash program.sh
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1 +1 @@
bf "$1" printf %s "$1" | bf

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.c printf %s "$1" > program.c
gcc program.c -o program && ./program gcc program.c -o program && ./program
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.clj printf %s "$1" > program.clj
clojure program.clj clojure program.clj
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.cpp printf %s "$1" > program.cpp
g++ program.cpp -o program && ./program g++ program.cpp -o program && ./program
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,9 +1,9 @@
if [ "$EVAL_EXPR" = "true" ]; then if [ "$EVAL_EXPR" = "true" ]; then
csharp -e "$1" printf %s "$1" | csharp -e
else else
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.cs printf %s "$1" > program.cs
csc program.cs >/dev/null && mono program.exe csc program.cs >/dev/null && mono program.exe
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.exs printf %s "$1" > program.exs
elixir program.exs elixir program.exs
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.fs printf %s "$1" > program.fs
fsharpc --optimize- program.fs >/dev/null && mono program.exe fsharpc --optimize- program.fs >/dev/null && mono program.exe
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,7 +1,7 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
export GOCACHE=/tmp/"$CODEDIR"/cache export GOCACHE=/tmp/"$CODEDIR"/cache
echo "$1" > program.go printf %s "$1" > program.go
go run program.go go run program.go
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -3,7 +3,7 @@ if [ "$EVAL_EXPR" = "true" ]; then
else else
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.hs printf %s "$1" > program.hs
ghc -e main program.hs ghc -e main program.hs
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > Main.java printf %s "$1" > Main.java
javac Main.java && java Main javac Main.java && java Main
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,5 +1,5 @@
if [ "$EVAL_HARMONY" = "true" ]; then if [ "$EVAL_HARMONY" = "true" ]; then
node --harmony -p "$1" printf %s "$1" | node --harmony -p
else else
node -p "$1" printf %s "$1" | node -p
fi fi

View file

@ -1,5 +1,5 @@
if [ "$EVAL_EXPR" = "true" ]; then if [ "$EVAL_EXPR" = "true" ]; then
julia -E "$1" printf %s "$1" | julia -E
else else
julia -e "$1" printf %s "$1" | julia -e
fi fi

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.lua printf %s "$1" > program.lua
lua5.3 program.lua lua5.3 program.lua
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.ml printf %s "$1" > program.ml
ocamlopt -cclib --static -o program program.ml && ./program ocamlopt -cclib --static -o program program.ml && ./program
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.pas printf %s "$1" > program.pas
# fpc does not use stderr, ld however does, capture both # fpc does not use stderr, ld however does, capture both
res="$(fpc program.pas 2>&1)" res="$(fpc program.pas 2>&1)"
@ -8,7 +8,7 @@ res="$(fpc program.pas 2>&1)"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
./program ./program
else else
echo "$res" printf %s "$res"
exit 1 exit 1
fi fi

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.pl printf %s "$1" > program.pl
perl program.pl perl program.pl
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1 +1 @@
php -r "$1" printf %s "$1" | php -r

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.pl printf %s "$1" > program.pl
swipl --quiet program.pl swipl --quiet program.pl
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.py printf %s "$1" > program.py
python program.py python program.py
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.py printf %s "$1" > program.py
python program.py python program.py
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.rkt printf %s "$1" > program.rkt
racket program.rkt racket program.rkt
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.rb printf %s "$1" > program.rb
ruby program.rb ruby program.rb
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR" mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.rs printf %s "$1" > program.rs
rustc -C opt-level=0 --color never program.rs && ./program rustc -C opt-level=0 --color never program.rs && ./program
cd .. && rm -rf "$CODEDIR" cd .. && rm -rf "$CODEDIR"