360 Secure SkillHub
360 安全技能中心

Tr Tool

该 Skill 封装 tr 的字符翻译能力,通过命令行参数指定字符集,对标准输入执行字符替换(如小写转大写)、删除(-d)和重复字符压缩(-s),结果写入标准输出。附有 scripts/tr.py 脚本。lint 将其标记为包含破坏性删除操作,未声明许可与兼容性信息。

dinghaibin
dinghaibin
热度 32.46
最近更新 2026-05-11 17:47:34
分类:效率依赖:代码执行应用场景:数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add tr-tool
Metadata
name
tr-tool
description
Translate or delete characters from input streams. Use for character substitution, deletion, and squeezing repeated characters.

Tr - Character Translation Utility

Translate, squeeze, or delete characters from standard input. Replaces specified characters with alternatives or removes them entirely.

Usage

tr-tool [options] <set1> [set2]

Common Uses

  • 'a-z' 'A-Z': Convert lowercase to uppercase
  • '\n' ' ': Replace newlines with spaces
  • -d 'aeiou': Delete all vowels
  • -s ' ': Squeeze repeated spaces

Examples

echo "hello" | tr-tool 'a-z' 'A-Z'
echo "foo bar" | tr-tool -d ' '
echo "hello   world" | tr-tool -s ' '