Hacker News new | ask | show | jobs
by pwd_mkdb 3670 days ago
i try to write my scripts in such a way that if all newlines were lost, the script would still run. semicolons even where optional.

requiring the use of bash for non-interactive use? good grief.

is it possible this company has a linux bias?

the usefulness of a minimal scripting shell cannot be denied. even with linux distribs that use bash, we almost always see busybox in use. busybox is more like the almquist sh than bash.

with sh, bash-only features may not work.

for example, shellshock did not work with almquist sh.

why are bash script not given a .bash file extension to distinguish them from sh scripts (.sh extension)?

.ksh extension is often used for korn shell scripts.

2 comments

Given that every server and most desktops at Google are Linux, and that it created at least two operating systems based on Linux (Android and ChromeOS) -- yes, I think it would be safe to say there's a Linux bias :)
>is it possible this company has a linux bias?

Why would they have any other bias? Is there any other viable alternative on the server side they should car about? Are Google realistically going to switch to it? It's not like 1990, where you coded so that your script worked with 5+ UNIX vendors.

>with sh, bash-only features may not work.

Sounds like a self-inflicted problem. Just arrange so bash handles your scripts (which they do).

>.ksh extension is often used for korn shell scripts.

A trip down memory lane...