logoalt Hacker News

gaigalastoday at 1:48 AM1 replyview on HN

Most shell families precede the spec. Both bash and ksh had features at the time the spec was written that are not in it. It's weird.

My main point is that following the spec doesn't guarantee shell scripts will be portable, which is a common misconception.


Replies

qudattoday at 4:41 AM

> My main point is that following the spec doesn't guarantee shell scripts will be portable, which is a common misconception.

That feels like a failure in the spec. Your example illustrates it: echo has unspecified behavior that literally prevents it from being portable.

Is it possible portability is just not a feature of posix?

show 1 reply