You certainly meant /bin/sh is not the Bourne again shell. I updated my comment to clear any possible misunderstanding
/bin/sh shouldn't be a C shell, it's always a POSIX-compatible shell IIRC
In the wild, hopefully not, but I do remember coming across /bin/sh executing csh in an obscure RTOS-ish / proprietary flavor of Linux that we were prototyping at a previous employer. Would've been around 2008. I can't remember the variant, but I remember being caught off-guard by it.
AFAIK /bin/sh is standard; if you cannot trust that /bin/sh is a Bourne-like sh, you might as well have to assume /usr/bin/env can not be what it was meant to be too.
Re:Shell Style Guide
by peterwwillis on Tuesday May 15, 2018 @12:14PM
(#17075058)
I suppose you're right, though the main point is it may not have Bourne-again extensions
I once triggered an automatic deploy that ran a bash script that minified a bunch of css/html/js assets and pushed them to S3, at some path like `/assets/vX.X.X/whatever.css`. Unfortunately, a few of our deploy boxes had Dash instead of Bourne shell, and when it ran on dash it failed to parse the version tag to push and ended up pushing an empty dir to /assets - deleting everything. Fun experience.
Re:Shell Style Guide
by michaelcampbell on Wednesday May 16, 2018 @02:26PM
(#17085070)
> /bin/sh is most often either the C shell,
Never once have I ever seen this. In 25+ years.
edit: bourne again shell