bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'pr' expands tabs incorrectly?


From: Macomson, Wis
Subject: 'pr' expands tabs incorrectly?
Date: Wed, 14 Mar 2007 14:48:34 -0700

Pardon me if I don't understand the man page, but 'pr' appears to expand
tabs on output when I don't tell it to, and don't want it to.

The goal is to merge a number of tab-delimited files, side by side in a
combined tab-delimited file.  I think the following should do it:

      pr -t -i -m -s file1 file2 file3

where "file1", "file2", and "file3" are tab-delimited and contain no
spaces.  I understand "-t" to supress headers, "-m" to merge the files,
"-s" set the column separator (between files) to the default "tab", and
"-i" to convert spaces to tabs on output, which should be irrelevant.

However, the output shows tabs in the first file, but the tabs in
"file2" and "file3" are converted to spaces.  The column separator is
"tab" as it should be.

On HPUX (B 11), 'pr' does "the right thing" (no spaces show up in
output).

Version info:

 $ uname -a
 Linux dplxnb306 2.6.5-7.145lxset1-smp #1 SMP Thu Jan 27 09:19:29 UTC
2005 x86_64 x86_64 x86_64 GNU/Linux
 $ pr --version
 pr (coreutils) 5.2.1
 Written by Pete TerMaat and Roland Huebner.

 Copyright (C) 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.

Am I doing something wrong, or is there a problem in 'pr'?

Thanks,

-wis

TESTING:

pr -m -t -i -s f1 f2 f3 > prout

- file 1 -
f1r1c1  f1r1c2  f1r1c3  f1r1c4  f1r1c5
f1r2c1  f1r2c2  f1r2c3  f1r2c4  f1r2c5
f1r3c1  f1r3c2  f1r3c3  f1r3c4  f1r3c5
f1r4c1  f1r4c2  f1r4c3  f1r4c4  f1r4c5
- end file 1 -

- file 2 -
f2r1c1  f2r1c2  f2r1c3  f2r1c4  f2r1c5
f2r2c1  f2r2c2  f2r2c3  f2r2c4  f2r2c5
f2r3c1  f2r3c2  f2r3c3  f2r3c4  f2r3c5
f2r4c1  f2r4c2  f2r4c3  f2r4c4  f2r4c5
- end file 2 -

- file 3 -
f3r1c1  f3r1c2  f3r1c3  f3r1c4  f3r1c5
f3r2c1  f3r2c2  f3r2c3  f3r2c4  f3r2c5
f3r3c1  f3r3c2  f3r3c3  f3r3c4  f3r3c5
f3r4c1  f3r4c2  f3r4c3  f3r4c4  f3r4c5
- end file 3 -





reply via email to

[Prev in Thread] Current Thread [Next in Thread]