You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
]is not purely decorative.[will refuse to function if its last argument isn't]. \$\endgroup\$[with its other formtest, then the]can be omitted without changing anything else in the call - I'm simply making the point that it's not actual bash syntax, just visual sugar. \$\endgroup\$]is[syntax and you have to provide it just like how you have to terminate a statement in C with a semicolon. \$\endgroup\$function x(){syntax: You can drop the parens, as you say, but you can also just drop thefunctionpart. In fact, that's how POSIX shell defines functions, so it's more portable that way. You could define a full function in 13 characters. For example:x(){ startx;}\$\endgroup\$alias [=testthen while[ 1 = 1works,[ 1 = 1 ]will complainbash: test: too many arguments. I don't suggest breaking things that might load later, which means you'd want something liketest2(){ local x=;for i in "$@";do test -z "$x"&&x=1&&set --;test "$i" != \]&&set -- "$@" "$i";done;test "$@";};alias [=test2— though this seems pedantic and against the spirit of the language. I do not recommend it. \$\endgroup\$