360 Secure SkillHub
360 安全技能中心

Sed Tool

该 Skill 以命令行方式提供流式文本编辑能力,通过脚本命令对输入流或文件执行查找替换、按模式删除行、打印指定行等操作,并支持 -i 就地修改文件,适用于文本批量规范化与简单内容转换。

分类:效率
dinghaibin
dinghaibin
热度 22.14
最近更新 2026-05-11 17:47:10

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add dinghaibin/sed-tool
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
sed-tool
description
Stream editor for filtering and transforming text using scripts. Use for find-and-replace, text manipulation, and batch file editing.

Stream Editor

Perform basic text transformations on input streams using scripting commands. Supports find-and-replace, deletion, insertion, and conditional operations.

Usage

sed-tool [options] <script> [file...]

Common Commands

  • s/old/new/: Substitute text
  • /pattern/d: Delete matching lines
  • Np: Print line N
  • -i: Edit files in-place

Examples

# Find and replace
sed-tool 's/foo/bar/g' file.txt

# Edit in-place
sed-tool -i 's/old/new/g' config.ini

# Delete lines matching pattern
sed-tool '/debug/d' log.txt