44

10 个实战及面试常用 Shell 脚本编写

 5 years ago
source link: https://juejin.im/post/5bf512d85188252ea66ae21c
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
注意事项1)开头加解释器:#!/bin/bash2)语法缩进,使用四个空格;多加注释说明。3)命名建议规则:变量名大写、局部变量小写,函数名小写,名字体现出实际作用。4)默认变量是全局的,在函数中变量local指定为局部变量,避免污染其他作用域。5)有两个命令

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK