Hello Cygwinstas,
Today (the last day of the year, Happy New Years, all)... today I have an
inquiry about how cygwin handles the script shebang line in a sh script.
When invoking a simple script (not that the complexity would matter at
all), I get a warning like:
./list2str.sh: line 1: #!/bin/bash: No such file or directory
I don't recall ever seeing this happen with perl scripts, for example. I
have tried every permutation I could think of: And the script executes
successfully. The permissions on the script are correct (owner has execute)
and the script has *nix line endings. I have tried:
#!/usr/bin/bash
#!/usr/bin/bash.exe
#!/bin/bash
#!/bin/sh
#!/usr/bin/sh
Can I have some illumination bestowed upon me? Thanks.
The script:
#!/usr/bin/bash.exe
# Last modified: Wed Dec 31 2025 03:06:47 PM -05:00 [EST]
</dev/clipboard perl -0777 -e 'my ($l)=<>; $l=~s{\cM?\cJ}[ ]g; print $l;'
# Used for converting a vertical list (embedded newlines) to a single
string.
--
Soren 'tino
He's earthy, he's pithy, he's ...a bit astringent.
Think of him more as a "topical antiseptic" than as a snack.
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple