← 返回命令列表

Linux command

pamsplit 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Split

pamsplit [input.pam] "[image%d.pam]"

Pad

pamsplit -padname [4] [input.pam] "[image%d.pam]"

Use default filenames

pamsplit [input.pam]

Read from stdin

cat [stream.pnm] | pamsplit - "[frame%d.pnm]"

说明

pamsplit reads a Netpbm stream that contains multiple concatenated PAM, PNM, PBM, PGM, or PPM images and writes each image to a separate file. The output filenames are generated from a printf-style pattern that includes a %d for the image index. The tool is the inverse of pnmcat / pamcat and is part of the Netpbm package.

参数

-padname _digits_
Pad the sequence number with leading zeros to at least _digits_ characters (so -padname 3 produces image000, image001, ...). Useful for ensuring lexicographic ordering of output files.

FAQ

What is the pamsplit command used for?

pamsplit reads a Netpbm stream that contains multiple concatenated PAM, PNM, PBM, PGM, or PPM images and writes each image to a separate file. The output filenames are generated from a printf-style pattern that includes a %d for the image index. The tool is the inverse of pnmcat / pamcat and is part of the Netpbm package.

How do I run a basic pamsplit example?

Run `pamsplit [input.pam] "[image%d.pam]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -padname _digits_ do in pamsplit?

Pad the sequence number with leading zeros to at least _digits_ characters (so -padname 3 produces image000, image001, ...). Useful for ensuring lexicographic ordering of output files.