360 Secure SkillHub
360 安全技能中心

Merge

提供 shell 脚本封装的文件合并能力,支持两文件拼接、行交错、按关键列连接 CSV、合并 JSON 数组或对象、输出差异、公共行、各自独有行、按顺序去重以及应用补丁文件,结果以标准输出或指定输出文件返回,依赖 python3 处理 CSV/JSON。

bytesagain
bytesagain
热度 37.78
最近更新 2026-03-19 18:56:53
分类:效率依赖:代码执行 / 读写文件应用场景:数据处理 / 工作流

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add merge
Metadata
name
merge
version
3.0.1
author
BytesAgain
homepage
https://bytesagain.com
source
https://github.com/bytesagain/ai-skills
license
MIT-0
tags
["merge","file-management","diff","data-processing"]
description
Combine files, resolve conflicts, concatenate data, and deduplicate across sources. Use when merging files, resolving conflicts, deduplicating datasets.

merge

File merge tool.

Commands

files

Concatenate two files

scripts/script.sh files <f1> <f2> [output]

lines

Interleave lines from two files

scripts/script.sh lines <f1> <f2>

csv

Join two CSVs on a key column

scripts/script.sh csv <f1> <f2> <key-col>

json

Merge two JSON files (arrays or objects)

scripts/script.sh json <f1> <f2>

diff

Show differences between files

scripts/script.sh diff <f1> <f2>

common

Show lines common to both files

scripts/script.sh common <f1> <f2>

unique

Show lines unique to each file

scripts/script.sh unique <f1> <f2>

dedup

Remove duplicate lines (preserving order)

scripts/script.sh dedup <file>

patch

Apply a patch file

scripts/script.sh patch <file> <patchfile>

Requirements

  • python3

Powered by BytesAgain | bytesagain.com | hello@bytesagain.com