From owner-svn-src-all@FreeBSD.ORG Sun Dec 16 16:55:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE7BAE29; Sun, 16 Dec 2012 16:55:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8A19E8FC0C; Sun, 16 Dec 2012 16:55:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGtfLX014649; Sun, 16 Dec 2012 16:55:41 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGtfYU014646; Sun, 16 Dec 2012 16:55:41 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161655.qBGGtfYU014646@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:55:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244298 - stable/8/usr.bin/cut X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 16:55:41 -0000 Author: eadler Date: Sun Dec 16 16:55:40 2012 New Revision: 244298 URL: http://svnweb.freebsd.org/changeset/base/244298 Log: MFC r236866,r236867: - Consistenly mention columns and fields - Add -b to short error messages Approved by: kevlo Approved by: cperciva (implicit) Modified: stable/8/usr.bin/cut/cut.1 stable/8/usr.bin/cut/cut.c Directory Properties: stable/8/usr.bin/cut/ (props changed) Modified: stable/8/usr.bin/cut/cut.1 ============================================================================== --- stable/8/usr.bin/cut/cut.1 Sun Dec 16 16:55:11 2012 (r244297) +++ stable/8/usr.bin/cut/cut.1 Sun Dec 16 16:55:40 2012 (r244298) @@ -72,7 +72,7 @@ The items specified by .Ar list can be in terms of column position or in terms of fields delimited by a special character. -Column numbering starts from 1. +Column and field numbering start from 1. .Pp The .Ar list @@ -82,14 +82,14 @@ number ranges. Number ranges consist of a number, a dash .Pq Sq \- , and a second number -and select the fields or columns from the first number to the second, +and select the columns or fields from the first number to the second, inclusive. Numbers or number ranges may be preceded by a dash, which selects all -fields or columns from 1 to the last number. +columns or fields from 1 to the last number. Numbers or number ranges may be followed by a dash, which selects all -fields or columns from the last number to the end of the line. +columns or fields from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. -It is not an error to select fields or columns not present in the +It is not an error to select columns or fields not present in the input line. .Pp The options are as follows: Modified: stable/8/usr.bin/cut/cut.c ============================================================================== --- stable/8/usr.bin/cut/cut.c Sun Dec 16 16:55:11 2012 (r244297) +++ stable/8/usr.bin/cut/cut.c Sun Dec 16 16:55:40 2012 (r244298) @@ -168,7 +168,7 @@ get_list(char *list) * set a byte in the positions array to indicate if a field or * column is to be selected; use +1, it's 1-based, not 0-based. * Numbers and number ranges may be overlapping, repeated, and in - * any order. We handle "-3-5" although there's no real reason too. + * any order. We handle "-3-5" although there's no real reason to. */ for (; (p = strsep(&list, ", \t")) != NULL;) { setautostart = start = stop = 0; @@ -191,9 +191,9 @@ get_list(char *list) } } if (*p) - errx(1, "[-cf] list: illegal list value"); + errx(1, "[-bcf] list: illegal list value"); if (!stop || !start) - errx(1, "[-cf] list: values may not include zero"); + errx(1, "[-bcf] list: values may not include zero"); if (maxval < stop) { maxval = stop; needpos(maxval + 1);