diff --git a/README.md b/README.md index c28a57c..1bfcd56 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,77 @@ # shell-scripts -用于记录 Shell 脚本学习和保存常用脚本的仓库。 \ No newline at end of file +用于记录 Shell 脚本学习和保存常用脚本的仓库。 + +## 目录结构 + +```bash +shell-scripts/ +├── README.md +├── LICENSE +├── tutorials/ +│ ├── basic/ +│ │ ├── 01-introduction.sh +│ │ ├── 02-variables.sh +│ │ ├── 03-conditionals.sh +│ │ ├── 04-loops.sh +│ │ └── ... +│ ├── intermediate/ +│ │ ├── 01-functions.sh +│ │ ├── 02-arrays.sh +│ │ ├── 03-file-io.sh +│ │ └── ... +│ ├── advanced/ +│ │ ├── 01-regex.sh +│ │ ├── 02-subprocesses.sh +│ │ └── ... +│ └── examples/ +│ ├── example1.sh +│ ├── example2.sh +│ └── ... +├── scripts/ +│ ├── system/ +│ │ ├── backup.sh +│ │ ├── cleanup.sh +│ │ └── ... +│ ├── network/ +│ │ ├── ping-test.sh +│ │ ├── port-scan.sh +│ │ └── ... +│ ├── utility/ +│ │ ├── file-rename.sh +│ │ ├── download.sh +│ │ └── ... +│ └── ... +└── notes/ + ├── shell-basics.md + ├── scripting-tips.md + └── ... +``` + +## 目录解释 + +目录结构解释 +* README.md: 仓库的简介和使用说明。 +* LICENSE: MIT。 +* tutorials/: 存放学习资料和示例脚本,根据难度分为 basic、intermediate 和 advanced 三个子目录。 + * basic/: 基础知识的脚本,例如变量、条件语句、循环等。 + * intermediate/: 中级知识的脚本,例如函数、数组、文件 I/O 等。 + * advanced/: 高级知识的脚本,例如正则表达式、子进程等。 + * examples/: 各种综合示例脚本。 +* scripts/: 存放常用的 Shell 脚本,根据功能分为多个子目录。 + * system/: 系统相关脚本,例如备份、清理等。 + * network/: 网络相关脚本,例如网络测试、端口扫描等。 + * utility/: 工具脚本,例如文件重命名、下载工具等。 +* notes/: 存放学习笔记和技巧文档。 + +## 提交前缀 + +- `feat`: 新功能 +- `fix`: 修复 Bug +- `docs`: 仅文档更改 +- `style`: 不影响代码含义的更改(空格、格式、缺少分号等) +- `refactor`: 既不是修复 Bug 也不是添加功能的代码更改 +- `perf`: 提高性能的代码更改 +- `test`: 添加缺失的测试或纠正现有测试 +- `chore`: 构建过程或辅助工具和库(如文档生成)的更改 +- `revert`: 恢复先前的提交 \ No newline at end of file diff --git a/notes/.gitkeep b/notes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scripts/network/.gitkeep b/scripts/network/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scripts/system/.gitkeep b/scripts/system/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scripts/utility/.gitkeep b/scripts/utility/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tutorials/advanced/.gitkeep b/tutorials/advanced/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tutorials/basics/.gitkeep b/tutorials/basics/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tutorials/examples/.gitkeep b/tutorials/examples/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tutorials/intermediate/.gitkeep b/tutorials/intermediate/.gitkeep new file mode 100644 index 0000000..e69de29