Add awk support

Basic awk support
This commit is contained in:
mattx 2020-02-15 17:42:38 +01:00 committed by GitHub
parent 7bc9b5b63a
commit 4edbe1008d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

5
lxc/executors/awk Normal file
View file

@ -0,0 +1,5 @@
cd /tmp/$2
timeout -s KILL 2 sed "/___code___/Q" code.code > code.stdin
timeout -s KILL 2 sed "1,/___code___/d" code.code > code.awk
timeout -s KILL 3 awk -f code.awk < code.stdin
runuser -l runner$1 -c "cd /tmp/$2 ; timeout -s KILL 3 awk -f code.awk < code.stdin"