Artificial intelligent assistant

Bash function comments before or inside the function Does the Bash language have a standard that dictates whether comments about the function should precede the function or be placed inside of it. I have seen scripts written both ways. # Comment preceding function. func1(){ echo "example" } -or- func2() { # Comment inside of function echo "example" }

In most programming languages, the comments that describe what the function does go before the function. You should probably do the same for bash. You should also use indentation:


# function 1 comment
func1() {
echo "example"
}

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e7d296063c3098c5b7a28e09aecf0c02