HPlogo HP-UX Reference Volume 1 of 5 > s

split(1)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

split — split a file into pieces

SYNOPSIS

split [-l line_count] [-a suffix_length] [file [name]]

split [-b n [k|m]] [-a suffix_length] [file [name]]

Obsolescent

split [- n] [file [name]]

DESCRIPTION

split reads file and writes it in pieces (default 1000 lines) onto a set of output files. The name of the first output file is name with aa appended, and so on lexicographically, up to zz (only ASCII letters are used, a maximum of 676 files). If no output name is given, x is the default.

If no input file is given, or if - is given instead, the standard input file is used.

Options

split recognizes the following command-line options and arguments:

-l line_count

The input file is split into pieces line_count lines in size.

-a suffix_length

suffix_length letters are used to form the suffix of the output filenames. This option allows creation of more than 676 output files. The output file names created cannot exceed the maximum file name length allowed in the directory containing the files.

-b n

The input file is split into pieces n bytes in size.

-b nk

The input file is split into pieces n × 1024 bytes in size. No space separates the n from the k.

-b nm

The input file is split into pieces n × 1048576 bytes in size. No space separates the n from the m.

-n

The input file is split into pieces n lines in size. This option is obsolescent and is equivalent to using the -l line_count option.

EXTERNAL INFLUENCES

Environment Variables

LC_CTYPE determines the locale for the interpretation of text as single- and/or multi-byte characters.

LC_MESSAGES determines the language in which messages are displayed.

If LC_CTYPE or LC_MESSAGES is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable. If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG.

If any internationalization variable contains an invalid setting, split behaves as if all internationalization variables are set to "C". See environ(5).

International Code Set Support

Single- and multi-byte character code sets are supported.

SEE ALSO

bfs(1), csplit(1).

STANDARDS CONFORMANCE

split: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2

© Hewlett-Packard Development Company, L.P.