csplit man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

csplit(1)							     csplit(1)

       csplit - context split

       prefix] number] file arg1 [...argn]

       reads  file, separates it into n+1 sections as defined by the arguments
       arg1 ...	 argn, and places the results in separate files.  The  maximum
       number of arguments (arg1 through argn) allowed is 99 unless the option
       is used to allow for more output file names.  If the option  is	speci‐
       fied, the resulting filenames are through prefixNN where NN is the two-
       digit value of n using a leading zero if n is less  than	 10.   If  the
       option  is not specified, the default filenames through are used.  file
       is divided as follows:

	      Default	 Prefixed
	      Filename	 Filename	       Contents
		xx00	 prefix00   From start of file up to  (but
				    not including) the line refer‐
				    enced by arg1.
		xx01	 prefix01   From the  line  referenced	by
				    arg1 up to the line referenced
				    by arg2.
		xxNN	 prefixNN   From the  line  referenced	by
				    argn to end of file.

       If the file argument is standard input is used.

       supports the Basic Regular Expression syntax (see regexp(5)).

       recognizes the following options:

	      Suppress printing of all character counts
			     normally  prints  the  character  counts for each
			     file created).

	      Leave previously created files intact
			     normally  removes	created	 files	if  an	 error

	      Name created files
			     through prefixNN (default is through

	      The output file name suffix will use
			     number  digits instead of the default This allows
			     creation of more than 100 output files.

       Arguments (arg1 through argn) to can be any combination of the  follow‐

	      Create a file containing the section from the current line
			     up	 to  (but not including) the line matching the
			     regular expression regexp.	 The new current  line
			     becomes the line matching regexp.

	      Create a file containing the section from the cur‐
	      rent line
			     up to (but not including)	the  nth
			     before  or	 after the line matching
			     the  regular   expression	 regexp.
			     (e.g., The new current line becomes
			     the line matching plus or	minus  n

	      equivalent to  except  that no file is created for
			     the section.

	      line_number    Create a file from the current line
			     up to (but not including) line_num‐
			     ber.  The new current line	 becomes

	      Repeat argument.
			     This argument can follow any of the
			     above argument forms.  If	it  fol‐
			     lows  a regexp argument, that argu‐
			     ment is applied num more times.  If
			     it follows line_number, the file is
			     split every line_number  lines  for
			     num  times	 from  that  point until
			     end-of-file  is  reached	or   num

	      Repeats  previous	 operand as many times as neces‐
	      sary to
			     finish input.

       Enclose in appropriate quotes all regexp	 arguments  con‐
       taining	blanks	or  other  characters  meaningful to the
       shell.  Regular expressions  must  not  contain	embedded
       new-lines.   does  not alter or remove the original file;
       it is the user's responsibility to remove it when  appro‐

   Environment Variables
       determines the collating sequence used in evaluating reg‐
       ular expressions.

       determines the  characters  matched  by	character  class
       expressions in regular expressions.

       determines the language in which messages are displayed.

       If or or is not specified in the environment or is set to
       the empty string, the value of is used as a  default  for
       each  unspecified or empty variable.  If is not specified
       or is set to the empty string,  a  default  of  "C"  (see
       lang(5))	 is  used instead of If any internationalization
       variable contains an invalid setting, behaves as	 if  all
       internationalization variables are set to "C".  See envi‐

   International Code Set Support
       Single- and multi-byte character code sets are supported.

       Messages are self explanatory except for:

       which means that the given argument did not  reference  a
       line  between  the  current  position  and the end of the
       file.  This warning also occurs if the file is  exhausted
       before the repeat count is.

       Create  four  files,  through After editing the ``split''
       files,  recombine  them	back  into  the	 original  file,
       destroying its previous contents.

       Perform editing operations

       Split  a file at every 100 lines, up to 10,000 lines (100
       files).	The  option  causes  the  created  files  to  be
       retained	 if  there are fewer than 10,000 lines (an error
       message is still printed).

       Assuming that follows the normal C coding  convention  of
       terminating routines with a at the beginning of the line,
       create a file containing each separate C routine	 (up  to
       21) in

       sh(1), split(1), environ(5), lang(5), regexp(5).


List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net