From 4edbe1008d3a6fbdc80e06032bf9a6a08ae31c02 Mon Sep 17 00:00:00 2001 From: mattx Date: Sat, 15 Feb 2020 17:42:38 +0100 Subject: [PATCH] Add awk support Basic awk support --- lxc/executors/awk | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lxc/executors/awk diff --git a/lxc/executors/awk b/lxc/executors/awk new file mode 100644 index 0000000..5345cf4 --- /dev/null +++ b/lxc/executors/awk @@ -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"