360 Secure SkillHub
360 安全技能中心

Nl Tool

该 Skill 提供 nl-tool 命令行工具,为文本文件逐行添加行号,支持 -ba 为所有行编号、-bt 仅为非空行编号,以及 -v 设置起始值、-i 设置增量。适用于代码审阅、文档引用和日志分析场景。材料未提供编号格式细节及错误处理说明。

dinghaibin
dinghaibin
热度 30.01
最近更新 2026-05-11 17:46:41
分类:效率依赖:代码执行 / 读写文件应用场景:数据处理

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add nl-tool
Metadata
name
nl-tool
description
Number lines of text files, showing line numbers alongside content. Use for reference, indexing, and code line numbering.

NL - Line Numbering Utility

Add line numbers to text files. Supports configurable number formats, starting values, and numbering schemes. Useful for code review, document reference, and log analysis.

Usage

nl-tool [options] <file>

Options

  • -ba: Number all lines (including blank)
  • -bt: Number non-empty lines only (default)
  • -v N: Start numbering from N
  • -i N: Increment by N for each line

Examples

# Number all lines including blanks
nl-tool -ba script.sh

# Start from 100
nl-tool -v 100 data.txt