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"
echo "$1" > program.apl
printf %s "$1" > program.apl
apl --OFF -s -f program.apl
cd .. && rm -rf "$CODEDIR"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
mkdir "$CODEDIR" && cd "$CODEDIR"
echo "$1" > program.pl
printf %s "$1" > program.pl
perl program.pl
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"
echo "$1" > program.pl
printf %s "$1" > program.pl
swipl --quiet program.pl
cd .. && rm -rf "$CODEDIR"

View file

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

View file

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

View file

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

View file

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

View file

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