Open malongshuai opened 1 year ago
https://www.junmajinlong.com/shell/script_course/shell_function/
Linux基础系列文章大纲Shell系列文章大纲 Bash函数在shell中,函数可以被当作命令一样执行,它是命令的组合结构体。 函数的语法结构: 1[ function ] name () compound-cmd [redirection] 例如:定义一个名为rm的函数,该函数会将所有参数指定的文件移动到~/backup目录下,目的是替代rm命令,避免误删除的危险操作。 1$ f
https://www.junmajinlong.com/shell/script_course/shell_function/
Linux基础系列文章大纲Shell系列文章大纲 Bash函数在shell中,函数可以被当作命令一样执行,它是命令的组合结构体。 函数的语法结构: 1[ function ] name () compound-cmd [redirection] 例如:定义一个名为rm的函数,该函数会将所有参数指定的文件移动到~/backup目录下,目的是替代rm命令,避免误删除的危险操作。 1$ f