360 Secure SkillHub
360 安全技能中心

Sort Tool

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

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

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add dinghaibin/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