Result

WA

Duration

1054ms

Code [DL]

awk -vFS="" '$0=$2~$3?$2:$5'

stdin

276 679
117 756
155 859
855 574
311 116
254 436
612 769
795 916
321 226
766 613
466 662
171 117
217 493
443 225
938 182
619 213
165 828
144 338
877 556
926 722
436 662
144 929
881 817
685 751
957 571
481 884
239 139
985 587
679 737
966 276
977 175
735 667

stdout

stderr

/volume/CODE:1: syntax error
I give up.
/root/script: line 5: /tmp/code: not found
rm: can't remove '/tmp/code': No such file or directory

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffef96f10b0 /* 9 vars */) = 0
11    execve("/usr/local/bin/iverilog", ["/usr/local/bin/iverilog", "-o", "/tmp/code", "/volume/CODE"], 0x55dd12c8cd50 /* 9 vars */) = 0
12    execve("/bin/sh", ["sh", "-c", "/usr/local/lib/ivl/ivlpp  -L -F\""...], 0x7ffffb8a8050 /* 9 vars */) = 0
14    execve("/usr/local/lib/ivl/ivl", ["/usr/local/lib/ivl/ivl", "-C/tmp/ivrlh3999c4e2", "-C/usr/local/lib/ivl/vvp.conf", "--", "-"], 0x5619dcaca290 /* 9 vars */) = 0
13    execve("/usr/local/lib/ivl/ivlpp", ["/usr/local/lib/ivl/ivlpp", "-L", "-F/tmp/ivrlg23999c4e2", "-f/tmp/ivrlg3999c4e2", "-p/tmp/ivrli3999c4e2"], 0x5619dcaca2a8 /* 9 vars */) = 0
13    +++ exited with 0 +++
12    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    +++ exited with 2 +++
12    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
12    +++ exited with 2 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
11    +++ exited with 2 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
15    execve("/bin/cat", ["cat", "-"], 0x55dd12c8cd08 /* 9 vars */ <unfinished ...>
16    execve("/tmp/code", ["/tmp/code"], 0x55dd12c8ccf0 /* 9 vars */) = -1 ENOENT (No such file or directory)
15    <... execve resumed>)             = 0
16    +++ exited with 127 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16, si_uid=0, si_status=127, si_utime=0, si_stime=0} ---
15    --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=15, si_uid=0} ---
15    +++ killed by SIGPIPE +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=15, si_uid=0, si_status=SIGPIPE, si_utime=0, si_stime=0} ---
17    execve("/bin/rm", ["rm", "/tmp/code"], 0x55dd12c8cc98 /* 9 vars */) = 0
17    +++ exited with 1 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=17, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
10    +++ exited with 1 +++