It may have been exactly a decade since the last one, but here it is at
last: a proper new ksh release. :) Many thanks to all contributors for
Roughly a thousand bugs have been fixed, including many serious/critical
On Mon, 1 Aug 2022 22:40:39 +0200
Martijn Dekker <martijn@inlv.demon.nl> wrote:
It may have been exactly a decade since the last one, but here it is at >>last: a proper new ksh release. :) Many thanks to all contributors for
The ship sailed long ago, arrived at its destination, did a round the
world tour and was scrapped. Everyone uses bash or tcsh now unless there's
a legacy reason not to.
Roughly a thousand bugs have been fixed, including many serious/critical
Rather worrying there were that many.
On Mon, 1 Aug 2022 22:40:39 +0200
Martijn Dekker <martijn@inlv.demon.nl> wrote:
It may have been exactly a decade since the last one, but here it is
at last: a proper new ksh release. :) Many thanks to all
contributors for
The ship sailed long ago, arrived at its destination, did a round the
world tour and was scrapped. Everyone uses bash or tcsh now unless
there's a legacy reason not to.
On 02.08.2022 at 18:06, muttley@dastardlyhq.com scribbled:
On Mon, 1 Aug 2022 22:40:39 +0200
Martijn Dekker <martijn@inlv.demon.nl> wrote:
It may have been exactly a decade since the last one, but here it is=20
at last: a proper new ksh release. :) Many thanks to all
contributors for =20
The ship sailed long ago, arrived at its destination, did a round the=20
world tour and was scrapped. Everyone uses bash or tcsh now unless
there's a legacy reason not to.
I'm not so sure about tcsh being all that popular. While it makes for
a decent interactive shell, it's a bad one for scripting because of its
many unpredictable/undefined behaviors.
On Mon, 1 Aug 2022 22:40:39 +0200
Martijn Dekker <martijn@inlv.demon.nl> wrote:
It may have been exactly a decade since the last one, but here it is at >>last: a proper new ksh release. :) Many thanks to all contributors for
The ship sailed long ago, arrived at its destination, did a round the
world tour and was scrapped.
Everyone uses bash or tcsh now unless there's
a legacy reason not to.
Roughly a thousand bugs have been fixed, including
many serious/critical
Rather worrying there were that many.
Aragorn <thorongil@telenet.be> writes:
On 02.08.2022 at 18:06, muttley@dastardlyhq.com scribbled:
world tour and was scrapped. Everyone uses bash or tcsh now unless
there's a legacy reason not to.
I'm not so sure about tcsh being all that popular. While it makes for
a decent interactive shell, it's a bad one for scripting because of its
many unpredictable/undefined behaviors.
I think mutt would be surprised at the extent to which
ksh is still used.
On Mon, 1 Aug 2022 22:40:39 +0200
Martijn Dekker <martijn@inlv.demon.nl> wrote:
It may have been exactly a decade since the last one, but here it is at
last: a proper new ksh release. :) Many thanks to all contributors for
The ship sailed long ago, arrived at its destination, did a round the
world tour and was scrapped. Everyone uses bash or tcsh now unless there's
a legacy reason not to.
Roughly a thousand bugs have been fixed, including many serious/critical
Rather worrying there were that many.
Panix sells access to shared unix shell accounts, and has since the[...]
early 1990s. Originally it was A/UX, then SunOS, now NetBSD shell hosts.
I've been a customer since 1997.
:r! cut -f 7 -d : /etc/passwd | sort | uniq -c | sort -nr | head
533 /usr/local/bin/bash
422 /usr/local/bin/tcsh
414 /usr/local/bin/psh
180 /usr/local/bin/zsh
91 /usr/local/bin/ksh
27 /bin/false
15 /usr/local/bin/ksh93
I am one of the ksh93 users ("Version AJM 93u+ 2012-08-01"), while ksh
is PD ksh ("PD KSH v5.2.14 99/07/13.2"), likely the ksh that ships with
this version of NetBSD.
However many bugs there are in this ksh, there are only three that
regularly bite me, and yet I'm still interested in this new ksh release.
Maybe some people prefer ksh? I mean, I bet the devs do, at the very least.
In comp.unix.shell, Scott Lurndal <slp53@pacbell.net> wrote:
Aragorn <thorongil@telenet.be> writes:
On 02.08.2022 at 18:06, muttley@dastardlyhq.com scribbled:
world tour and was scrapped. Everyone uses bash or tcsh now unless
there's a legacy reason not to.
Everyone, here being the small group you think representative.
If you are excluding zsh, you have not met my coworkers.
However many bugs there are in this ksh, there are only three that
regularly bite me, and yet I'm still interested in this new ksh release.
Follow-ups trimmed to comp.unix.shell
In comp.unix.shell muttley@dastardlyhq.com wrote:
On Mon, 1 Aug 2022 22:40:39 +0200
Martijn Dekker <martijn@inlv.demon.nl> wrote:
It may have been exactly a decade since the last one, but here it is at >>>last: a proper new ksh release. :) Many thanks to all contributors for
The ship sailed long ago, arrived at its destination, did a round the
world tour and was scrapped.
I miss the meaning of this.
Everyone uses bash or tcsh now unless there's
a legacy reason not to.
No, maybe everyone on Linux, but there are other UNIX
systems and ksh is used on them. ksh is the default
shell for AIX.
many serious/critical
Rather worrying there were that many.
Isn't that the point of this release, fix issues :)
muttley@dastardlyhq.com crossposted to >comp.unix.shell,de.comp.os.unix.shell,comp.unix.programmer, ignoring
Martijn Dekker's Followup-To: comp.unix.shell header field:
[=E2=80=A6]
Please, don't keep crossposting to the german speaking newsgroup >de.comp.os.unix.shell unless you are willing to post in German.
Martijn suggested to discuss the shell in comp.unix.shell, which is
the perfect place to do, that's why he put a Followup-To header
field in his article.
So, unless you've got a very good reason to ignore it, you should
obey him.
Crosspost & Followup-To: comp.unix.shell
On Wed, 3 Aug 2022 00:14:01 -0000 (UTC)
Eli the Bearded <*@eli.users.panix.com> wrote:
In comp.unix.shell, Scott Lurndal <slp53@pacbell.net> wrote:
Aragorn <thorongil@telenet.be> writes:
On 02.08.2022 at 18:06, muttley@dastardlyhq.com scribbled:
world tour and was scrapped. Everyone uses bash or tcsh now unless
there's a legacy reason not to.
Everyone, here being the small group you think representative.
The last 4 companies I've worked at all used Linux and bash was the shell. >One of these companies was a major aircraft manufacturer.
On Wed, 3 Aug 2022 00:14:01 -0000 (UTC)
Eli the Bearded <*@eli.users.panix.com> wrote:
In comp.unix.shell, Scott Lurndal <slp53@pacbell.net> wrote:
Aragorn <thorongil@telenet.be> writes:
On 02.08.2022 at 18:06, muttley@dastardlyhq.com scribbled:
world tour and was scrapped. Everyone uses bash or tcsh now unless
there's a legacy reason not to.
Everyone, here being the small group you think representative.
The last 4 companies I've worked at all used Linux and bash was the shell. One of these companies was a major aircraft manufacturer.
If you are excluding zsh, you have not met my coworkers.
I probably should have included zsh because of MacOS. tsch is used on FreeBSD.
On Wed, 03 Aug 2022 07:47:31 +0200
Helmut Waitzmann <nn.throttle@xoxy.net> wrote:
muttley@dastardlyhq.com crossposted to >>comp.unix.shell,de.comp.os.unix.shell,comp.unix.programmer, ignoring >>Martijn Dekker's Followup-To: comp.unix.shell header field:
Please, don't keep crossposting to the german speaking newsgroup >>de.comp.os.unix.shell unless you are willing to post in German.
Martijn suggested to discuss the shell in comp.unix.shell, which is
the perfect place to do, that's why he put a Followup-To header
field in his article.
So, unless you've got a very good reason to ignore it, you should
obey him.
My very good reason is I don't subscribe to comp.os.unix.shell.
Followups are rude and I have them disabled in my newsreader. If
you only want to post in 1 group then only post in 1 group.
Don't post in 3 so people replying in non followup groups never see
either their message or any other responses.
Crosspost & Followup-To: comp.unix.shell
Ignored.
Apart from that, discussing “ksh” is offtopic even in >“comp.unix.programmer” (unless you are going to improve its code
and need help in programming for unix). The only appropriate
newsgroup is “comp.unix.shell”. So it's debatable, whether Martijn >shouldn't have posted his announcement to “comp.unix.shell”.
muttley@dastardlyhq.com writes:
On Wed, 3 Aug 2022 00:14:01 -0000 (UTC)
Eli the Bearded <*@eli.users.panix.com> wrote:
In comp.unix.shell, Scott Lurndal <slp53@pacbell.net> wrote:
Aragorn <thorongil@telenet.be> writes:
On 02.08.2022 at 18:06, muttley@dastardlyhq.com scribbled:
world tour and was scrapped. Everyone uses bash or tcsh now unless >>>>>> there's a legacy reason not to.
Everyone, here being the small group you think representative.
The last 4 companies I've worked at all used Linux and bash was the shell. >>One of these companies was a major aircraft manufacturer.
Many distributions of linux installed ksh alongside bash. Did
you check the nis maps for a pop count on each shell?
On Wed, 03 Aug 2022 19:45:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
muttley@dastardlyhq.com writes:
On Wed, 3 Aug 2022 00:14:01 -0000 (UTC)
Eli the Bearded <*@eli.users.panix.com> wrote:
In comp.unix.shell, Scott Lurndal <slp53@pacbell.net> wrote:
Aragorn <thorongil@telenet.be> writes:
On 02.08.2022 at 18:06, muttley@dastardlyhq.com scribbled:
world tour and was scrapped. Everyone uses bash or tcsh now unless >>>>>>> there's a legacy reason not to.
Everyone, here being the small group you think representative.
The last 4 companies I've worked at all used Linux and bash was the shell. >>>One of these companies was a major aircraft manufacturer.
Many distributions of linux installed ksh alongside bash. Did
you check the nis maps for a pop count on each shell?
No, but ksh wasn't supported at any of them so if someone used it they'd
have to accept possible incompatabilities with company build and admin >scripts.
muttley@dastardlyhq.com writes:
On Wed, 03 Aug 2022 19:45:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
muttley@dastardlyhq.com writes:
On Wed, 3 Aug 2022 00:14:01 -0000 (UTC)
Eli the Bearded <*@eli.users.panix.com> wrote:
In comp.unix.shell, Scott Lurndal <slp53@pacbell.net> wrote:
Aragorn <thorongil@telenet.be> writes:
On 02.08.2022 at 18:06, muttley@dastardlyhq.com scribbled:
world tour and was scrapped. Everyone uses bash or tcsh now unless >>>>>>>> there's a legacy reason not to.
Everyone, here being the small group you think representative.
The last 4 companies I've worked at all used Linux and bash was the shell. >>>>One of these companies was a major aircraft manufacturer.
Many distributions of linux installed ksh alongside bash. Did
you check the nis maps for a pop count on each shell?
No, but ksh wasn't supported at any of them so if someone used it they'd >>have to accept possible incompatabilities with company build and admin >>scripts.
Why is that? The scripts should all have hash-bang introductions
which specify exactly which shell the script uses. (e.g. #!/bin/ksh).
On Thu, 04 Aug 2022 19:29:44 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
muttley@dastardlyhq.com writes:
On Wed, 03 Aug 2022 19:45:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
muttley@dastardlyhq.com writes:
On Wed, 3 Aug 2022 00:14:01 -0000 (UTC)
Eli the Bearded <*@eli.users.panix.com> wrote:
In comp.unix.shell, Scott Lurndal <slp53@pacbell.net> wrote:
Aragorn <thorongil@telenet.be> writes:
On 02.08.2022 at 18:06, muttley@dastardlyhq.com scribbled:
world tour and was scrapped. Everyone uses bash or tcsh now unless >>>>>>>>> there's a legacy reason not to.
Everyone, here being the small group you think representative.
The last 4 companies I've worked at all used Linux and bash was the shell. >>>>>One of these companies was a major aircraft manufacturer.
Many distributions of linux installed ksh alongside bash. Did
you check the nis maps for a pop count on each shell?
No, but ksh wasn't supported at any of them so if someone used it they'd >>>have to accept possible incompatabilities with company build and admin >>>scripts.
Why is that? The scripts should all have hash-bang introductions
which specify exactly which shell the script uses. (e.g. #!/bin/ksh).
Should. How often do you see it in practice?
muttley@dastardlyhq.com writes:
Should. How often do you see it in practice?
100%. As noted in other posts, we use a number of different interactive >shells, and a number of scripting languages (tcsh, ksh, bash, perl, python, >tcl, et alia). And that's been true for every POE I've worked in for
the last three plus decades (system or processor OEMs primarily).
If there's no she-bang, then the script can still be run by
explicitly invoking the appropriate shell (bash /path/to/bash/script).
On Thu, 04 Aug 2022 20:28:06 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
muttley@dastardlyhq.com writes:
Should. How often do you see it in practice?
100%. As noted in other posts, we use a number of different interactive >>shells, and a number of scripting languages (tcsh, ksh, bash, perl, python, >>tcl, et alia). And that's been true for every POE I've worked in for
the last three plus decades (system or processor OEMs primarily).
Don't believe you. I've seen more scripts than I can count that didn't
have the hash bang at the start. No idea what a she-bang is. Sounds like
a service for sailors in a port.
On Thu, 04 Aug 2022 20:28:06 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
muttley@dastardlyhq.com writes:
Should. How often do you see it in practice?
100%. As noted in other posts, we use a number of different interactive >>shells, and a number of scripting languages (tcsh, ksh, bash, perl, python, >>tcl, et alia). And that's been true for every POE I've worked in for
the last three plus decades (system or processor OEMs primarily).
Don't believe you. I've seen more scripts than I can count that didn't
have the hash bang at the start. No idea what a she-bang is. Sounds like
a service for sailors in a port.
If there's no she-bang, then the script can still be run by
explicitly invoking the appropriate shell (bash /path/to/bash/script).
It'll be invoked directly anyway by /bin/sh if its +x. I'd have thought in >you three plus decades of experience would have discovered that by now.
muttley@dastardlyhq.com writes:[...]
On Thu, 04 Aug 2022 20:28:06 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
If there's no she-bang, then the script can still be run by
explicitly invoking the appropriate shell (bash /path/to/bash/script).
It'll be invoked directly anyway by /bin/sh if its +x. I'd have thought in >>you three plus decades of experience would have discovered that by now.
Yes, that experience tells me that don't want to rely on that behavior, because it doesn't necessarily invoke /bin/sh, it invokes $SHELL.
And if the shell script being invoked isn't in $SHELL dialect, undefined behavior will ensue.
That's why we always either use she-bang, or use the invoke the script
using the target shell explicitly.
scott@slp53.sl.home (Scott Lurndal) writes:
muttley@dastardlyhq.com writes:[...]
On Thu, 04 Aug 2022 20:28:06 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
If there's no she-bang, then the script can still be run by
explicitly invoking the appropriate shell (bash /path/to/bash/script).
It'll be invoked directly anyway by /bin/sh if its +x. I'd have thought in >>>you three plus decades of experience would have discovered that by now.
Yes, that experience tells me that don't want to rely on that behavior,
because it doesn't necessarily invoke /bin/sh, it invokes $SHELL.
And if the shell script being invoked isn't in $SHELL dialect, undefined
behavior will ensue.
That's why we always either use she-bang, or use the invoke the script
using the target shell explicitly.
In a quick experiment, it seems that such a script is invoked either by >current shell or by /bin/sh, depending on which shell I invoke it from.
I don't see any cases where it depends on $SHELL.
The behavior may vary on different systems -- which is why I also avoid >relying on it.
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
scott@slp53.sl.home (Scott Lurndal) writes:
muttley@dastardlyhq.com writes:[...]
On Thu, 04 Aug 2022 20:28:06 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
If there's no she-bang, then the script can still be run by >>>>>explicitly invoking the appropriate shell (bash /path/to/bash/script). >>>>It'll be invoked directly anyway by /bin/sh if its +x. I'd have thought in >>>>you three plus decades of experience would have discovered that by now.
Yes, that experience tells me that don't want to rely on that behavior,
because it doesn't necessarily invoke /bin/sh, it invokes $SHELL.
And if the shell script being invoked isn't in $SHELL dialect, undefined >>> behavior will ensue.
That's why we always either use she-bang, or use the invoke the script
using the target shell explicitly.
In a quick experiment, it seems that such a script is invoked either by >>current shell or by /bin/sh, depending on which shell I invoke it from.
I don't see any cases where it depends on $SHELL.
The behavior may vary on different systems -- which is why I also avoid >>relying on it.
Open Group says this (under execle):
There are two distinct ways in which the contents of the process image
file may cause the execution to fail, distinguished by the setting of
errno to either [ENOEXEC] or [EINVAL] (see the ERRORS section). In the
cases where the other members of the exec family of functions would fail
and set errno to [ENOEXEC], the execlp() and execvp() functions shall
execute a command interpreter and the environment of the executed command
shall be as if the process invoked the sh utility using execl() as follows:
execl(<shell path>, arg0, file, arg1, ..., (char *)0);
where <shell path> is an unspecified pathname for the sh utility, file
is the process image file, and for execvp(), where arg0, arg1, and
so on correspond to the values passed to execvp() in argv[0], argv[1], and so on.
I've worked with C library implementations that derive <shell path> from $SHELL
if set.
scott@slp53.sl.home (Scott Lurndal) writes:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
scott@slp53.sl.home (Scott Lurndal) writes:
muttley@dastardlyhq.com writes:[...]
On Thu, 04 Aug 2022 20:28:06 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Yes, that experience tells me that don't want to rely on that behavior, >>>> because it doesn't necessarily invoke /bin/sh, it invokes $SHELL.If there's no she-bang, then the script can still be run by >>>>>>explicitly invoking the appropriate shell (bash /path/to/bash/script). >>>>>It'll be invoked directly anyway by /bin/sh if its +x. I'd have thought in >>>>>you three plus decades of experience would have discovered that by now. >>>>
And if the shell script being invoked isn't in $SHELL dialect, undefined >>>> behavior will ensue.
That's why we always either use she-bang, or use the invoke the script >>>> using the target shell explicitly.
In a quick experiment, it seems that such a script is invoked either by >>>current shell or by /bin/sh, depending on which shell I invoke it from.
I don't see any cases where it depends on $SHELL.
The behavior may vary on different systems -- which is why I also avoid >>>relying on it.
Open Group says this (under execle):
There are two distinct ways in which the contents of the process image
file may cause the execution to fail, distinguished by the setting of
errno to either [ENOEXEC] or [EINVAL] (see the ERRORS section). In the
cases where the other members of the exec family of functions would fail >> and set errno to [ENOEXEC], the execlp() and execvp() functions shall
execute a command interpreter and the environment of the executed command >> shall be as if the process invoked the sh utility using execl() as follows:
execl(<shell path>, arg0, file, arg1, ..., (char *)0);
where <shell path> is an unspecified pathname for the sh utility, file
is the process image file, and for execvp(), where arg0, arg1, and
so on correspond to the values passed to execvp() in argv[0], argv[1], and so on.
I've worked with C library implementations that derive <shell path> from $SHELL
if set.
And for at least some shells, executing a file doesn't just invoke one
of the exec*() functions. When I use execvp() in a C program to execute
a script with no "#!" line, it uses /bin/sh. When I run the same script
from bash, it uses the currently running bash, even when the current
bash is neither $SHELL nor /bin/bash.
muttley@dastardlyhq.com writes:
On Thu, 04 Aug 2022 20:28:06 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
muttley@dastardlyhq.com writes:
Should. How often do you see it in practice?
100%. As noted in other posts, we use a number of different interactive >>>shells, and a number of scripting languages (tcsh, ksh, bash, perl, python, >>>tcl, et alia). And that's been true for every POE I've worked in for
the last three plus decades (system or processor OEMs primarily).
Don't believe you. I've seen more scripts than I can count that didn't
have the hash bang at the start. No idea what a she-bang is. Sounds like
a service for sailors in a port.
Well, where I worked, every shell script we shipped to customers had
a hash bang. Feel free to not believe me too.
That's why we always either use she-bang, or use the invoke the script
On Thu, 04 Aug 2022 23:23:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of the atlantic you're on. Its never called "she" and I've never heard anyone anywhere ever refer to it like this.
On Thu, 04 Aug 2022 17:06:33 -0400
Dan Espen <dan1espen@gmail.com> wrote:
muttley@dastardlyhq.com writes:
On Thu, 04 Aug 2022 20:28:06 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
muttley@dastardlyhq.com writes:
Should. How often do you see it in practice?
100%. As noted in other posts, we use a number of different interactive >>>>shells, and a number of scripting languages (tcsh, ksh, bash, perl, python, >>>>tcl, et alia). And that's been true for every POE I've worked in for >>>>the last three plus decades (system or processor OEMs primarily).
Don't believe you. I've seen more scripts than I can count that didn't
have the hash bang at the start. No idea what a she-bang is. Sounds like >>> a service for sailors in a port.
Well, where I worked, every shell script we shipped to customers had
a hash bang. Feel free to not believe me too.
I wasn't talking about commercially shipped scripts, I was talking about internal ones as I'm sure you understood.
On Thu, 04 Aug 2022 23:23:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of the atlantic you're on. Its never called "she" and I've never heard anyone anywhere ever refer to it like this.
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of the atlantic you're on. Its never called "she" and I've never heard anyone anywhere ever refer to it like this.
Someone seems to be batting 1000.
In article <tclltg$3r6oa$2@dont-email.me>,
Dan Espen <dan1espen@gmail.com> wrote:
...
Someone seems to be batting 1000.
Hint: It's not you.
Muttley@dastardlyhq.com writes:
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >> the atlantic you're on. Its never called "she" and I've never heard anyone >> anywhere ever refer to it like this.
People have been calling it that for ages. I’m not a fan but it’s not >new.
Muttley@dastardlyhq.com writes:
On Thu, 04 Aug 2022 23:23:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >> the atlantic you're on. Its never called "she" and I've never heard anyone >> anywhere ever refer to it like this.
Here, have a look:
https://en.wikipedia.org/wiki/Shebang_(Unix)
Someone seems to be batting 1000.
On Thu, 04 Aug 2022 23:23:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >the atlantic you're on.
Muttley@dastardlyhq.com writes:
On Thu, 04 Aug 2022 23:23:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >>the atlantic you're on.
It is also known as "sharp" by musicians.
Muttley@dastardlyhq.com writes:
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >> the atlantic you're on. Its never called "she" and I've never heard anyone >> anywhere ever refer to it like this.
People have been calling it that for ages. I’m not a fan but it’s not new.
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >>> the atlantic you're on. Its never called "she" and I've never heard anyone >>> anywhere ever refer to it like this.
People have been calling it that for ages. I’m not a fan but it’s not >>new.
I've never heard it called that and I've been using *nix for 30 years. Perhaps
its an american thing.
On Sat, 06 Aug 2022 07:30:52 -0400, Richard Kettlewell <invalid@invalid.invalid> wrote:
Muttley@dastardlyhq.com writes:
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >>> the atlantic you're on. Its never called "she" and I've never heard anyone >>> anywhere ever refer to it like this.
People have been calling it that for ages. I’m not a fan but it’s not
new.
Regarding the # character, I was taught it was called a number sign. https://en.wikipedia.org/wiki/Number_sign
kcharselect agrees, Character: # U+0023, Name: NUMBER SIGN
or a sharp in musical notation.
I didn't here the term hash sign used for it till I started using usenet.
As for calling it the pound sign, I assume that's because US layout keyboards don't have a £ key.
On Sat, 06 Aug 2022 15:25:23 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Muttley@dastardlyhq.com writes:
On Thu, 04 Aug 2022 23:23:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >>>the atlantic you're on.
It is also known as "sharp" by musicians.
True. Also MS with C# :)
On Sat, 06 Aug 2022 07:30:52 -0400, Richard Kettlewell <invalid@invalid.invalid> wrote:
Muttley@dastardlyhq.com writes:
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >>> the atlantic you're on. Its never called "she" and I've never heard anyone >>> anywhere ever refer to it like this.
People have been calling it that for ages. I’m not a fan but it’s not
new.
Regarding the # character, I was taught it was called a number sign. >https://en.wikipedia.org/wiki/Number_sign
kcharselect agrees, Character: # U+0023, Name: NUMBER SIGN
or a sharp in musical notation.
I didn't here the term hash sign used for it till I started using usenet.
As for calling it the pound sign, I assume that's because US layout keyboards >don't have a £ key.
On 2022-08-05, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
scott@slp53.sl.home (Scott Lurndal) writes:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes: >>>>scott@slp53.sl.home (Scott Lurndal) writes:
muttley@dastardlyhq.com writes:[...]
On Thu, 04 Aug 2022 20:28:06 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Yes, that experience tells me that don't want to rely on that behavior, >>>>> because it doesn't necessarily invoke /bin/sh, it invokes $SHELL.If there's no she-bang, then the script can still be run by >>>>>>>explicitly invoking the appropriate shell (bash /path/to/bash/script). >>>>>>It'll be invoked directly anyway by /bin/sh if its +x. I'd have thought in
you three plus decades of experience would have discovered that by now. >>>>>
And if the shell script being invoked isn't in $SHELL dialect, undefined >>>>> behavior will ensue.
That's why we always either use she-bang, or use the invoke the script >>>>> using the target shell explicitly.
In a quick experiment, it seems that such a script is invoked either by >>>>current shell or by /bin/sh, depending on which shell I invoke it from. >>>>I don't see any cases where it depends on $SHELL.
The behavior may vary on different systems -- which is why I also avoid >>>>relying on it.
Open Group says this (under execle):
There are two distinct ways in which the contents of the process image >>> file may cause the execution to fail, distinguished by the setting of
errno to either [ENOEXEC] or [EINVAL] (see the ERRORS section). In the >>> cases where the other members of the exec family of functions would fail >>> and set errno to [ENOEXEC], the execlp() and execvp() functions shall
execute a command interpreter and the environment of the executed command >>> shall be as if the process invoked the sh utility using execl() as follows:
execl(<shell path>, arg0, file, arg1, ..., (char *)0);
where <shell path> is an unspecified pathname for the sh utility, file >>> is the process image file, and for execvp(), where arg0, arg1, and
so on correspond to the values passed to execvp() in argv[0], argv[1], and so on.
I've worked with C library implementations that derive <shell path> from $SHELL
if set.
And for at least some shells, executing a file doesn't just invoke one
of the exec*() functions. When I use execvp() in a C program to execute
a script with no "#!" line, it uses /bin/sh. When I run the same script
from bash, it uses the currently running bash, even when the current
bash is neither $SHELL nor /bin/bash.
What? Only sourcing a script should use the current shell; sourcing
isn't execution.
By "run from bash" are you referring to passing the script as a command
line argument as in
bash ./script
?
That bash instance will of course read and run the script. But if you
give bash a command via standard input:
bash$ ./script
that must run it in a child process..
When I do this:
$ echo ./testscript | strace -o log bash
The strace log has:
Bash reads the command and spawns a process.
Moreover, if we trace this again with -f to see what the child is doing:
1670 execve("./testscript", ["./testscript"], 0x1e00500 /* 24 vars */) = -1 ENOEXEC (Exec format error)
1670 openat(AT_FDCWD, "./testscript", O_RDONLY|O_LARGEFILE) = 3
1670 read(3, "FOO=abc\ncd /\n", 128) = 13
1670 close(3) = 0
See: execve happens.
It cannot be that bash would read a command and just run it in the
current shell, if that command isn't a built-in or user-defined
function.
It also cannot be that bash would just fork a child process, and
then interpret the script without exec; a script without hash bang
has to be given the proper treatment through exec to choose
the interpreter in a consistent way.
"David W. Hodgins" <dwhodgins@nomail.afraid.org> writes:
On Sat, 06 Aug 2022 07:30:52 -0400, Richard Kettlewell <invalid@invalid.invalid> wrote:
Muttley@dastardlyhq.com writes:
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script >>>>Wtf is "she" for? Its either called hash or pound depending on what side of
the atlantic you're on. Its never called "she" and I've never heard anyone >>>> anywhere ever refer to it like this.
People have been calling it that for ages. I’m not a fan but it’s not >>> new.
Regarding the # character, I was taught it was called a number sign.
https://en.wikipedia.org/wiki/Number_sign
kcharselect agrees, Character: # U+0023, Name: NUMBER SIGN
or a sharp in musical notation.
I didn't here the term hash sign used for it till I started using usenet.
As for calling it the pound sign, I assume that's because US layout keyboards
don't have a £ key.
And the '#' symbol is sometimes used to mean pound (weight).
Unicode calls it "NUMBER SIGN". Other names for it are pound sign,
hash, hashtag (in social media), sharp, and octothorp.
https://en.wikipedia.org/wiki/Number_sign
On Sat, 06 Aug 2022 08:13:34 -0400
Dan Espen <dan1espen@gmail.com> wrote:
Muttley@dastardlyhq.com writes:
Someone seems to be batting 1000.
Is that some obscure sports analogy?
Kaz Kylheku <480-992-1380@kylheku.com> writes:
Moreover, if we trace this again with -f to see what the child is doing:
1670 execve("./testscript", ["./testscript"], 0x1e00500 /* 24 vars */) = -1 ENOEXEC (Exec format error)
1670 openat(AT_FDCWD, "./testscript", O_RDONLY|O_LARGEFILE) = 3
1670 read(3, "FOO=abc\ncd /\n", 128) = 13
1670 close(3) = 0
See: execve happens.
It cannot be that bash would read a command and just run it in the
current shell, if that command isn't a built-in or user-defined
function.
Agreed.
(I never write scripts without a #! line, so I hadn't noticed this
behavior until recently.)
Muttley@dastardlyhq.com writes:
On Sat, 06 Aug 2022 15:25:23 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Muttley@dastardlyhq.com writes:
On Thu, 04 Aug 2022 23:23:05 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script >>>>Wtf is "she" for? Its either called hash or pound depending on what side of >>>>the atlantic you're on.
It is also known as "sharp" by musicians.
True. Also MS with C# :)
Which is the source for _SH_e bang.
On Sat, 06 Aug 2022 12:30:52 +0100
Richard Kettlewell <invalid@invalid.invalid> wrote:
Muttley@dastardlyhq.com writes:
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script
Wtf is "she" for? Its either called hash or pound depending on what side of >>> the atlantic you're on. Its never called "she" and I've never heard anyone >>> anywhere ever refer to it like this.
People have been calling it that for ages. I’m not a fan but it’s not
new.
I've never heard it called that and I've been using *nix for 30 years. Perhaps
its an american thing.
Muttley@dastardlyhq.com writes:
On Sat, 06 Aug 2022 08:13:34 -0400
Dan Espen <dan1espen@gmail.com> wrote:
Muttley@dastardlyhq.com writes:
Someone seems to be batting 1000.
Is that some obscure sports analogy?
Not obscure. Easily accessed by doing a search.
On 07/08/2022 01:03, Muttley@dastardlyhq.com wrote:
On Sat, 06 Aug 2022 12:30:52 +0100
Richard Kettlewell <invalid@invalid.invalid> wrote:
Muttley@dastardlyhq.com writes:
scott@slp53.sl.home (Scott Lurndal) wrote:
That's why we always either use she-bang, or use the invoke the script >>>>Wtf is "she" for? Its either called hash or pound depending on what side of
Been in use here in Oz since the 80s, to my knowledge.the atlantic you're on. Its never called "she" and I've never heard anyone >>>> anywhere ever refer to it like this.
People have been calling it that for ages. I’m not a fan but it’s not >>> new.
I've never heard it called that and I've been using *nix for 30 years. >Perhaps
its an american thing.
On Sat, 06 Aug 2022 17:45:19 -0400
Dan Espen <dan1espen@gmail.com> wrote:
Muttley@dastardlyhq.com writes:
On Sat, 06 Aug 2022 08:13:34 -0400
Dan Espen <dan1espen@gmail.com> wrote:
Muttley@dastardlyhq.com writes:
Someone seems to be batting 1000.
Is that some obscure sports analogy?
Not obscure. Easily accessed by doing a search.
You posted it, you explain otherwise STFU.
On Sat, 06 Aug 2022 17:45:19 -0400
Dan Espen <dan1espen@gmail.com> wrote:
Muttley@dastardlyhq.com writes:
On Sat, 06 Aug 2022 08:13:34 -0400
Dan Espen <dan1espen@gmail.com> wrote:
Muttley@dastardlyhq.com writes:
Someone seems to be batting 1000.
Is that some obscure sports analogy?
Not obscure. Easily accessed by doing a search.
You posted it, you explain otherwise STFU.
I wonder how long a test match would have to be to bat 1000. A month?
On 2022-08-07, Muttley@dastardlyhq.com <Muttley@dastardlyhq.com> wrote:
I wonder how long a test match would have to be to bat 1000. A month?
As short as a few seconds?
A rookie participant who has never swung a bat before, let alone played
ball, goes to bat, and happens to hit the one pitch that is thrown.
At that point, his or her batting average is 1000.
On 2022-08-07, Muttley@dastardlyhq.com <Muttley@dastardlyhq.com> wrote:
I wonder how long a test match would have to be to bat 1000. A month?
As short as a few seconds?
A rookie participant who has never swung a bat before, let alone played
ball, goes to bat, and happens to hit the one pitch that is thrown.
At that point, his or her batting average is 1000.
Muttley@dastardlyhq.com writes:
On Sat, 06 Aug 2022 17:45:19 -0400
Dan Espen <dan1espen@gmail.com> wrote:
Muttley@dastardlyhq.com writes:
On Sat, 06 Aug 2022 08:13:34 -0400
Dan Espen <dan1espen@gmail.com> wrote:
Muttley@dastardlyhq.com writes:
Someone seems to be batting 1000.
Is that some obscure sports analogy?
Not obscure. Easily accessed by doing a search.
You posted it, you explain otherwise STFU.
Oh sorry, didn't realize you were of limited abilities.
https://en.wiktionary.org/wiki/bat_a_thousand
Also, I was taught the ! is called an exclamation mark, not a bang.
David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
Also, I was taught the ! is called an exclamation mark, not a bang.
Never heard the term "bang path"?
https://en.wikipedia.org/wiki/UUCP#Mail_routing
The Path: header line in your post to this newsgroup looked like this:
Path: reader2.panix.com!panix!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
though you likely don't care.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 485 |
Nodes: | 16 (2 / 14) |
Uptime: | 130:38:07 |
Calls: | 9,655 |
Calls today: | 3 |
Files: | 13,705 |
Messages: | 6,166,483 |