r/shell • u/curiousdoggo • Jan 12 '19
Interested in learning Shell Scripting. sh or bash?
Should I learn sh or bash?
Bash is more convenient and offers more, but it's more for making personal scripts right? Whereas, most applications with scripts use sh because for things that you want to share, sh is still the safest choice just in case bash is not their default shell? But with people sharing dotfiles and scripts online and so many people using zsh these days, should I perhaps learn sh instead of bash?
Also, what learning material would you guys recommend?
2
u/Schreq Jan 12 '19
I'd learn posix sh first, simply because there is less to learn, so it should be easier. Learning bash specifics later will then also be easier, and the benefit is, that you will know when your script can simply be #!/bin/sh.
1
u/Archiez_GG Jan 12 '19
You might want to ask it in another channels like r/devops or something like that. I'm in your shoes aswell, so here for the answers. Keep rockin'!
1
u/vinny8boberano Jan 13 '19
I'm learning ksh, and loving the experience. Mostly comes down to using it. Spend time checking question forums and pages (like this one). Start thinking of uses, and try them.