this post was submitted on 03 May 2026
131 points (86.6% liked)
Technology
84699 readers
5726 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related news or articles.
- Be excellent to each other!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
- Check for duplicates before posting, duplicates may be removed
- Accounts 7 days and younger will have their posts automatically removed.
Approved Bots
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
but it isn't available anywhere else so I can't use it for scripts that get distributed.
If your script starts with
#!/bin/bash, both bash and zsh will run it fine. The bigger problem is the programs, filesystem and libraries being different. Which is why POSIX exists, if you're looking to write stuff that works across systems.I couldn't tell if you were honestly asking for explanations or if all of your complaints sum up to "it's different and I don't like that". Which honestly, fair.
not exactly. if you're worried about the differences between bash 3 and 5, you're probably using some intermediate bash-exclusive features because that's the headlining changes between these versions (google says associative arrays and new shellvars. even if zsh has equivalent features, the syntax would be different.) it's only "guaranteed" to run fine in both shells if the shebang ends in
/shto call the POSIX shell without any bash- or zsh- specific features.i don't get what @greyscale@lemmy.grey.ooo means by this though
bash 3.2 means that no, it wont run.