How to transfer scripts from bash to dash?

I would like to avoid installing bash for every new installation of Debian 6. Therefore, I need to convert all my bash scripts to dashes.
β€œHow do you do that?”
- What are the differences between the two languages?
- Do you know about any reservations and traps?
- Is it possible to automate this task?

+8
bash dash
source share
2 answers

Here is a page with some bashisms . You can use it as a guide to transfer from Bash to dash.

I do not know why you are saying that you need to install Bash . It is listed as a required package .

+7
source share

The best strategy is to stick to the standard instead of any specific implementation. Dash is much closer to her than Bash.

You can try Loker to get some help. If you are interested in this or have any problems, feel free to email me.

There are other other tools .

+5
source share

Source: https://habr.com/ru/post/651351/


All Articles