I generally try to follow the Linux Kernel coding style: https://www.kernel.org/doc/html/latest/process/coding-style.html But I do break some of the rules due to some experience with sh coding (and some personal preferences). If you want it closer to Linux Kernal coding stye, run it through: indent -linux -brf -c9 -ci8 -cli8 -l0 -nfca Specifically, I tend to use: function( var, var, var ); and if ( statement ) { rather than function(var, var, var); and if (statement) { as the later form tends to break sh scripts. Also, I have a preference for multi-line 1-line comments as in: (I find // easier to read and check than /* */) // ################################################################# // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License version 3 // as published by the Free Software Foundation. // // ################################################################# Rather than: /* * ################################################################# * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * as published by the Free Software Foundation. * * ################################################################# */ Again, this is from experience writing sh scripts: # ################################################################# # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 # as published by the Free Software Foundation. # # ################################################################# Finally - I like to indent my case targets - and I am a bit excessive with brackets {}