3 ms·
The bash not sh issue is due to ignorance on the part of the answerers not an XY problem. Also shell can"t do everything - you are in a POSIX environment so use
by pasc1878 3y ago
The bash not sh issue is due to ignorance on the part of the answerers not an XY problem. Also shell can"t do everything - you are in a POSIX environment so use POSIX tools. The Unix environment is an environment of putting together many small tools and not just using one so any shell script can call POSIX tools as a minimum. So just making a complex shell script rather than using the tools does need to explain why.
I must admit that I don"t buy in to that philosophy and like using one tool so for scripting I would do all in python, so I would not be answering that question.
Many Linux users think that their way is the only and that means bash as the shell and many others like GNU coreutils, gcc etc. I am an MacOS user and my professional career includes several non Linux Unixes so I know bash is not the only shell - try csh for fun - which is partly why I use python or previously perl as they are the same on all machines