in reply to Re: CR/LF in bin
in thread CR/LF in bin
Did you try either of your proposed solutions?
$ cd /tmp/perlmonks/ $ echo -e '#!/usr/bin/env perl \r\nprint "Foo!\\n";' > foo.pl $ chmod 0755 foo.pl $ ./foo.pl /usr/bin/env: ‘perl \r’: No such file or directory /usr/bin/env: use -[v]S to pass options in shebang lines $ echo -e '#!/usr/bin/env perl -w\r\nprint "Foo!\\n";' > foo.pl $ ./foo.pl /usr/bin/env: ‘perl -w\r’: No such file or directory /usr/bin/env: use -[v]S to pass options in shebang lines $
The correct solution is use -S on the env command:
$ echo -e '#!/usr/bin/env -S perl\r\nprint "Foo!\\n";' > foo.pl $ ./foo.pl Foo! $
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: CR/LF in bin
by dk (Chaplain) on May 09, 2024 at 17:43 UTC | |
by hippo (Archbishop) on May 09, 2024 at 22:19 UTC | |
by dk (Chaplain) on May 10, 2024 at 08:16 UTC | |
by hippo (Archbishop) on May 10, 2024 at 08:25 UTC | |
by choroba (Cardinal) on May 10, 2024 at 09:19 UTC | |
| |
| A reply falls below the community's threshold of quality. You may see it by logging in. |