News for hackers. Stuff that matters.
Re:CGI with Awk on OpenBSD Httpd (2020) by gbrown_ on Tuesday May 04, 2021 @09:29AM (#27037344)
I replied to someone on Twitter about this as I mistakenly thought they were the author, but the interpreter line in the example script should be #!/usr/bin/awk rather than #!/bin/awk.
Re:CGI with Awk on OpenBSD Httpd (2020) by the_trapper on Tuesday May 04, 2021 @10:03AM (#27037693)
The author actually has it right due to OpenBSD's httpd running in a chroot of /var/www.

Edit: nevermind, you're right, just checked it again and the author put the copied awk under /usr/bin inside the chroot

Re:CGI with Awk on OpenBSD Httpd (2020) by LeoPanthera on Tuesday May 04, 2021 @02:54PM (#27041376)
You can use "#!/usr/bin/env awk" to make it universal, this works on all the BSDs and Linux. Works for bash and other interpreters too.
Re:CGI with Awk on OpenBSD Httpd (2020) by gbrown_ on Tuesday May 04, 2021 @03:10PM (#27041602)
I just wanted to point out typo. I'm aware of the env idiom, though that wouldn't work in the chroot environment described in the article. Short of also copying it to the chroot which would be a bit redundant.
Re:CGI with Awk on OpenBSD Httpd (2020) by sigzero on Tuesday May 04, 2021 @12:38PM (#27039521)
Yeah, I don't see how to contact the actual author.