3 ms·
Yeah, OpenBSD says no to that. > If during parsing lines in the script, ksh finds a NUL byte on the line, it should abort ("syntax error: NUL byte unexpected")
by ElectricalUnion 1y ago
Yeah, OpenBSD says no to that.
> If during parsing lines in the script, ksh finds a NUL byte on the line, it should abort ("syntax error: NUL byte unexpected").
https://www.undeadly.org/cgi?action=article;sid=20240924105732 https://www.undeadly.org/cgi?action=article;sid=202409241057...
- hnlmorg 1y agoI think the GP was talking about a kernel parsing and how to stuff additional parameters in a hypothetical new scripting language. Whereas you’re talking about ksh specifically, which has its own specific parsing rules.
- kazinator 1y agoOpenBSD is one of the platforms I tested the Hash Bang Null Hack on. ksh is being successfully run, and is able to read a line of the script and find the null byte. However, ksh rejecting it means we couldn't use the trick with ksh, like to get it to ignore a <CR> in the hash bang line of a script that has <CR><LF> line endings. (Something discussed in a sibling subthread, in regard to a Perl script that failed due to a trailing <CR> in the hash bang line.)