360 Secure SkillHub
360 安全技能中心

Shuf Tool

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

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

安装

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