Shell

Bash语法、重定向、信号处理等脚本编写参考,适用于系统自动化与调试。

已扫描
适合谁
系统管理员、开发人员
不适合谁
无命令行使用经验的新手、仅需图形化操作的用户
国内可用性
需网络配置。可能需要网络配置或第三方服务可访问。
安装难度
新手友好(★☆☆)。基于终端操作、依赖、API Key 和本地环境要求的初步判断。

安装与下载

openclaw skills install @xueyetianya/shell

Skill 说明

命令、参数、文件名以原文为准

Shell — Shell 脚本参考

Bash 脚本编写、内置功能及最佳实践的快速参考。

何时使用

  • 编写具备正确错误处理机制的可靠 Bash 脚本
  • 理解重定向、管道和进程替换
  • 管理信号、陷阱和后台进程
  • 使用 set 选项和追踪调试 shell 脚本
  • 在 shell 特性与外部工具之间进行选择

命令

intro

scripts/script.sh intro

Shell 脚本概览 — Bash 特性、shebang、执行方式、可移植性。

variables

scripts/script.sh variables

变量 — 声明、作用域、数组、参数扩展、特殊变量。

control

scripts/script.sh control

控制流 — if/else、case、for、while、until、select、函数。

redirections

scripts/script.sh redirections

重定向与管道 — stdin/stdout/stderr、here文档、进程替换。

safety

scripts/script.sh safety

安全实践 — set -euo pipefail、引号使用、shellcheck、错误处理。

tools

scripts/script.sh tools

常用工具 — awk、sed、grep、find、xargs、cut、sort、jq 使用模式。

signals

scripts/script.sh signals

信号与陷阱 — SIGTERM、SIGINT、清理处理程序、后台任务。

checklist

scripts/script.sh checklist

Shell 脚本质量检查清单。

help

scripts/script.sh help

version

scripts/script.sh version

配置

变量描述
SHELL_DIR数据目录(默认:~/.shell/)

*由 BytesAgain 提供 | bytesagain.com | hello@bytesagain.com*

X
@xueyetianya

已收录 6 个 Skill

相关推荐