Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
cut(1)
Edit
PageHistory
Diff
Info
LikePages
!!NAME cut - remove sections from each line of files !!SYNOPSIS __cut__ ~[''OPTION'']... ~[''FILE'']... !!DESCRIPTION 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 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. !!REPORTING BUGS Report bugs to <bug-coreutils@gnu.org>. !!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. !!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. !!EXAMPLES Given output like <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> To get the filenames, use =cut -d "/" -f 4= - this uses / as the delimiter between fields, and gives you the fourth field.
4 pages link to
cut(1)
:
Man1c
colrm(1)
UnixWay
TextUtilities
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.