Re:Why don't we have Wayland on Raspberry Pi yet? (2018)
by codedokode on Tuesday April 23, 2019 @04:31PM
(#19732524)
Shell script also has dependencies: specific version of shell and CLI utilities. Shell script is a good thing when you need to write something quickly with hacks but it is not a good foundation for init system or build system. They easily break if you redefine variables like IFS, add command aliases or use names with spaces or special characters.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018)
by grumpydba on Tuesday April 23, 2019 @06:18PM
(#19733540)
> Shell script also has dependencies: specific version of shell and CLI utilities.
Just use posix stuff. And move on.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018)
by hdfbdtbcdg on Wednesday April 24, 2019 @01:57AM
(#19735909)
I'm curious.
How do you for example parse command line arguments in your shell scripts?
Do you regard sed, grep and awk as dependencies when bash scripting?
With regards Python. The subprocess, os, sys etc modules are standard library modules. There is no dependency overhead in using them. Most smaller Python scripts manage very nicely with the standard library.
If that's most of what a program is doing I would 10000 times rather read a script written in bash doing it than a python script that pulls in 800 dependencies just to get halfway to making these sorts of tasks take less than 5 lines for each invocation of a thing that takes less than 1 line in bash.
That's not to say that bash is perfect, but it is very good at what it does.