https://bugzilla.novell.com/show_bug.cgi?id=733154 https://bugzilla.novell.com/show_bug.cgi?id=733154#c0 Summary: kernel should warn about BOM on shell scripts, instead of resorting to /bin/sh Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel AssignedTo: kernel-maintainers@forge.provo.novell.com ReportedBy: jw@suse.com QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=464390) --> (http://bugzilla.novell.com/attachment.cgi?id=464390) hello_utf8 perl script. A shell script is a text file, and thus is likeely to contain an UTF-8 BOM when (e.g. a comment) contains UTF-8 $ ~/bin/hello_utf8 /suse/jw/bin/hello_utf8: line 1: #!/usr/bin/perl: No such file or directory /suse/jw/bin/hello_utf8: line 8: my: command not found Hello UTF-8 (Version ) , $ perl ~/bin/hello_utf8 Hello UTF-8 (Version 0.1) $ xxd ~/bin/hello_utf8 0000000: efbb bf23 212f 7573 722f 6269 6e2f 7065 ...#!/usr/bin/pe 0000010: 726c 0a23 0a23 2028 6329 2032 3031 3120 rl.#.# (c) 2011 0000020: 3c6a 7740 7375 7365 2e64 653e 204a c3bc <jw@suse.de> J.. 0000030: 7267 656e 2057 6569 6765 7274 0a23 0a23 rgen Weigert.#.# 0000040: 2032 3031 312d 3131 2d32 382c 206a 772c 2011-11-28, jw, 0000050: 2076 302e 3120 2d2d 2049 6e69 7469 616c v0.1 -- Initial 0000060: 2064 7261 7567 6874 2e0a 230a 0a6d 7920 draught..#..my 0000070: 2476 6572 7369 6f6e 203d 2027 302e 3127 $version = '0.1' 0000080: 3b0a 0a70 7269 6e74 6620 2248 656c 6c6f ;..printf "Hello 0000090: 2055 5446 2d38 2028 5665 7273 696f 6e20 UTF-8 (Version 00000a0: 2573 295c 6e22 2c20 2476 6572 7369 6f6e %s)\n", $version 00000b0: 3b0a ;. at least some diagnostics hinting at the BOM is needed in the first invocation. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.