360 Secure SkillHub
360 安全技能中心

Nl Tool

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

分类:效率
dinghaibin
dinghaibin
热度 21.57
最近更新 2026-05-11 17:46:41

安装

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