360 Secure SkillHub
360 安全技能中心

Sort Tool

该 Skill 提供 sort-tool 命令行工具,用于对文本文件的行按字母或数字顺序排列,支持逆序(-r)、去重(-u)、按指定列(-k)和字段分隔符(-t)排序,适用于数据准备、列表整理和输出格式化场景。

dinghaibin
dinghaibin
热度 30.64
最近更新 2026-05-11 17:47:18
分类:效率依赖:代码执行 / 读写文件应用场景:数据处理 / 自动化脚本

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add sort-tool
Metadata
name
sort-tool
description
Sort lines of text files alphabetically or numerically. Use for data preparation, list organization, and output formatting.

Line Sorting Utility

Arrange text file lines in specified order with support for numeric, month-name, and reverse sorting. Handles large files efficiently.

Usage

sort-tool [options] [file...]

Options

  • -n: Numeric sort
  • -r: Reverse order
  • -u: Unique lines (remove duplicates)
  • -k N: Sort by column N
  • -t SEP: Use SEP as field separator

Examples

# Alphabetical sort
sort-tool names.txt

# Numeric sort
sort-tool -n numbers.txt

# Sort by column 2
sort-tool -k 2 -t ',' data.csv