← 返回命令列表

Linux command

boxes 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Create

echo ["Hello World"] | boxes

Specific

echo ["Text"] | boxes -d [stone]

List

boxes -l

Remove

cat [boxed.txt] | boxes -r

说明

boxes is a text filter that draws ASCII art boxes around text. It supports numerous box designs and can both add and remove boxes, making it useful for creating eye-catching comments, headers, or decorative text in source code and documentation. The tool provides over 50 predefined box styles with customization options.

参数

-d _design_
Box design to use.
-l
List available designs with samples.
-r
Remove an existing box (design auto-detected; combine with -d to hint).
-a _format_
Alignment/positioning of text inside box (e.g., `hcvc` for horizontally and vertically centered).
-s _WxH_
Desired box size in columns (width) and lines (height).
-p _format_
Padding around input (e.g., `a1l3` = 1 space all around plus 3 extra on the left).
-f _file_
Use alternate config file.
-i _indent_
Indentation mode for input (`box`, `text`, or `none`).
-n _encoding_
Input/output character encoding.
-t _tabopts_
Tab handling options (expand/keep/unexpand).
-k _bool_
Leading/trailing blank lines in input handling.
-e _eol_
Force end-of-line style (`unix`, `dos`, `mac`).
-c _string_
Shortcut to create a basic box with the given character(s) as border.
-h
Print usage information.
-v
Print version information.

FAQ

What is the boxes command used for?

boxes is a text filter that draws ASCII art boxes around text. It supports numerous box designs and can both add and remove boxes, making it useful for creating eye-catching comments, headers, or decorative text in source code and documentation. The tool provides over 50 predefined box styles with customization options.

How do I run a basic boxes example?

Run `echo ["Hello World"] | boxes` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -d _design_ do in boxes?

Box design to use.