360 Secure SkillHub
360 安全技能中心

Shuf Tool

该 Skill 提供 shuf-tool 命令行工具,用于随机打乱输入文本行的顺序;支持通过 -n 输出 N 行、-i 指定数字区间、-r 有放回抽样、-e 将参数作为输入行,适用于随机抽样与数据随机化场景。

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

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add shuf-tool
Metadata
name
shuf-tool
description
Randomly shuffle lines of text input. Use for random sampling, data randomization, and selection tasks.

Shuf - Random Line Permutation

Randomize the order of input lines. Supports random selection of N lines and sampling with or without replacement for statistical tasks.

Usage

shuf-tool [options] [file]

Options

  • -n N: Output only N random lines
  • -i LO-HI: Treat each number LO..HI as an input line
  • -r: Allow repeated output (sampling with replacement)
  • -e: Treat each argument as an input line

Examples

shuf-tool names.txt
shuf-tool -n 5 data.txt
shuf-tool -i 1-100