🎴 Flashcard Mode
Linux System Administration and Shell Scripting
Card1 / 20
Mastered0
Review0
QuestionClick to flip
Which of the following are syntax that can be used to declare a function?
AnswerClick to flip back
A
function_name() {command-list }
💡 Explanation:
Shell functions are declared using the function_name() { command-list; } syntax. The function name is followed by empty parentheses, then a command list enclosed in braces. This is the standard POSIX-compliant function declaration format in bash and other Unix shells.