On 24.07.2024 19:48, Lira, Victor M wrote: > On 7/24/2024 12:44 AM, Jan Beulich wrote: >> Nit: In names of new files we prefer - over _. >> +script_name=`basename "$0"` > I have fixed the above comments in v2. > >>> +#!/bin/bash >> Can we rely on bash to be there and at that location? As you using any >> bash-isms in the script which cannot be avoided? > > Are the automation scripts required to be portable? Can you please point > me to a resource where I can learn how to make the script portable?
In addition to what Jason pointed you at, the more abstract answer is to look at the shell specification. E.g. https://pubs.opengroup.org/onlinepubs/007904975/utilities/contents.html (issue 6, i.e. a little dated by now) https://pubs.opengroup.org/onlinepubs/9699919799/ (issue 7, also already about 6 years old) https://pubs.opengroup.org/onlinepubs/9799919799/ (issue 8, very resent) The older variants may be relevant when backward compatibility matters. Jan