Differences between current version and revision by previous author of cut(1).
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 3 | Last edited on Sunday, May 22, 2005 8:50:37 pm | by CraigBox | |
Older page: | version 2 | Last edited on Monday, June 3, 2002 6:50:04 pm | by perry | Revert |
@@ -1,146 +1,57 @@
-CUT
-!!!CUT
-NAME
-SYNOPSIS
-DESCRIPTION
-AUTHOR
-REPORTING BUGS
-COPYRIGHT
-SEE ALSO
-----
!!NAME
+cut - remove sections from each line of files
-
-cut - remove sections from each line of files
!!SYNOPSIS
+__cut__ ~[''OPTION'']... ~[''FILE'']...
-
-__cut__ [[''OPTION'']... [[''FILE'']...
!!DESCRIPTION
-Print selected parts of lines from each FILE to standard
-
output.
+Print selected parts of lines from each FILE to standard output.
+Mandatory arguments to long options are mandatory for short options too.
+;__-b__, __-- bytes__=''LIST'' : output only these bytes
+;__-c__, __-- characters__=''LIST'' : output only these characters
+;__-d__, __-- delimiter__=''DELIM'' : use DELIM instead of TAB for field delimiter
+;__-f__, __-- fields__=''LIST'' : output only these fields; also print any line that contains no delimiter character, unless the __-s__ option is specified
+;__-n__ : (ignored)
+;__-s__, __-- only-delimited__ : do not print lines not containing delimiters
+;__-- output-delimiter__=''STRING'' : use STRING as the output delimiter the default is to use the input delimiter
+;__-- help__ : display this help and exit
+;__-- version__ : output version information and exit
-__-b__, __--bytes
__=
''LIST
''
+Use one, and only one of
__-b__, __-c__ or __
-f
__. Each LIST is made up of one range, or many ranges separated by commas. Each range is one of:
+;N : N
'th byte, character or field, counted from 1
+;N- : from N
'th byte, character or field, to end of line
+;N-M : from N
'th to M
'th (included) byte, character or field
+;__-M__ : from first to M'th (included) byte, character or field
+The order of bytes, characters or fields in the output will be identical to those in the input. With no FILE, or when FILE is -, read standard input.
-output only these bytes
-
-
-__-c__, __--characters__=''LIST''
-
-
-output only these characters
-
-
-__-d__, __--delimiter__=''DELIM''
-
-
-use DELIM instead of TAB for field delimiter
-
-
-__-f__, __--fields__=''LIST''
-
-
-output only these fields
-
-
-__-n__
-
-
-(ignored)
-
-
-__-s__, __--only-delimited__
-
-
-do not print lines not containing delimiters
-
-
-__--output-delimiter__=''STRING''
-
-
-use STRING as the output delimiter the default is to use the
-input delimiter
-
-
-__--help__
-
-
-display this help and exit
-
-
-__--version__
-
-
-output version information and exit
-
-
-Use one, and only one of __-b__, __-c__ or __-f__.
-Each LIST is made up of one range, or many ranges separated
-by commas. Each range is one of:
-
-
-N
-
-
-N'th byte, character or field, counted from 1
-
-
-N-
-
-
-from N'th byte, character or field, to end of
-line
-
-
-N-M
-
-
-from N'th to M'th (included) byte, character or
-field
-
-
-__-M__
-
-
-from first to M'th (included) byte, character or
-field
-
-
-The order of bytes, characters or fields in the output will
-be identical to those in the input. With no FILE, or when
-FILE is -, read standard input.
!!AUTHOR
+Written by David Ihnat, David ~MacKenzie, and Jim Meyering.
-
-Written by David Ihnat, David !MacKenzie, and Jim
-Meyering.
!!REPORTING BUGS
+Report bugs to <bug-coreutils@gnu.org>.
-
-Report bugs to
!!COPYRIGHT
+Copyright © 2004 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-Copyright 1999 Free Software Foundation, Inc.
-This is free software; see the source for copying
-conditions. There is NO warranty; not even for
-MERCHANTABILITY or FITNESS FOR A PARTICULAR
-PURPOSE.
!!SEE ALSO
+The full documentation for __cut__ is maintained as a Texinfo manual. If the __info__ and __cut__ programs are properly installed at your site, the command
+;: __info coreutils cut__
+should give you access to the complete manual.
-The full documentation for __cut__ is maintained as a
-Texinfo manual. If the __info__ and __cut__ programs
-are properly installed at your site, the
-command
+!!EXAMPLES
+Given output like
-__info cut
__
+<verbatim>
+./b/bind9/libisccc0
_9.2.4-1ubuntu1
_i386.deb
+./b/bind9/bind9
_9.2.4-1ubuntu1
_i386.deb
+./b/bind9/libisccfg0_9.2.4-1ubuntu1_i386.deb
+</verbatim>
-
-should give you access to
the complete manual.
--
---
+To get
the filenames, use =cut
-d "/"
-f 4=
- this uses / as the delimiter between fields, and gives you the fourth field.