All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH] docs: column.1 describe change of separator behavior in bugs section
Date: Sat, 29 Sep 2012 10:21:59 +0100	[thread overview]
Message-ID: <1348910519-10684-1-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1348692336-21301-1-git-send-email-kerolasa@iki.fi> <50636D1D.3080007@draigBrady.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1126 bytes --]

Add to manual page how to achieve old behavior, just in case someone
relies on buggy behavior of the command.

Reported-by: Pádraig Brady <P@draigbrady.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 text-utils/column.1 | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/text-utils/column.1 b/text-utils/column.1
index 2050666..775c73b 100644
--- a/text-utils/column.1
+++ b/text-utils/column.1
@@ -65,6 +65,35 @@ the screen if no other information is available.
 .nf
 sed 's/#.*//' /etc/fstab | column -t
 .nf
+.SH BUGS
+The util-linux version 2.23 changed
+.B \-s
+option to be non-greedy.  The change made the following output
+.PP
+.EX
+$ printf "a:b:c\n1::3\n" | column  -t -s ':'
+a  b  c
+1  3
+.EE
+.PP
+to be
+.PP
+.EX
+$ printf "a:b:c\n1::3\n" | column  -t -s ':'
+a  b  c
+1     3
+.EE
+.PP
+If there is need to use greedy separator the old behavior can be achieved
+by filtering with
+.BR sed (1).
+.PP
+.EX
+$ printf "xzcatxzdog\\ndonkeyxzzxkong\\n" |
+> sed 's/^[xz]*//
+> s/[xz]\\+/x/g' |
+> column -t -s xz
+.EE
 .SH "SEE ALSO"
 .BR colrm (1),
 .BR ls (1),
-- 
1.7.12.1


  parent reply	other threads:[~2012-09-29  9:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 20:45 [PATCH] column: make defined separator to be non-greedy Sami Kerola
2012-09-26 21:01 ` Pádraig Brady
2012-09-29  9:21 ` Sami Kerola [this message]
2012-09-29 10:23   ` [PATCH] docs: column.1 describe change of separator behavior in bugs section Pádraig Brady
2012-09-29 12:49     ` Sami Kerola
2012-10-02  8:45     ` Karel Zak
2012-10-02  8:29 ` [PATCH] column: make defined separator to be non-greedy Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348910519-10684-1-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.