Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 158749 - cut can not work correctly with two file argument
Summary: cut can not work correctly with two file argument
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: coreutils
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On: 129114
Blocks: 156320
TreeView+ depends on / blocked
 
Reported: 2005-05-25 13:13 UTC by Tim Waugh
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2005-544
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-28 17:02:55 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:544 qe-ready SHIPPED_LIVE coreutils bug fix update 2005-09-28 04:00:00 UTC

Description Tim Waugh 2005-05-25 13:13:27 UTC
+++ This bug was initially created as a clone of Bug #129114 +++

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.4.1)
Gecko/20031114 MultiZilla/1.6.3.1c

Description of problem:
Where are two file:
$ cat file1
1 abc
2 def
3 ghi
4 jkl
$ cat file2
a 123
b 456
c 789
d 248
and my locale is:
$ locale
LANG=zh_CN.GB18030
LC_CTYPE=zh_CN.GB18030
LC_NUMERIC="zh_CN.GB18030"
LC_TIME=en_US.UTF-8
LC_COLLATE="zh_CN.GB18030"
LC_MONETARY="zh_CN.GB18030"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="zh_CN.GB18030"
LC_NAME="zh_CN.GB18030"
LC_ADDRESS="zh_CN.GB18030"
LC_TELEPHONE="zh_CN.GB18030"
LC_MEASUREMENT="zh_CN.GB18030"
LC_IDENTIFICATION="zh_CN.GB18030"
LC_ALL=
then when execute the command as below:
$ cut -d " " -f 1 file1 file2
always gets this result:
1
2
3
4
\n
I think this is a bug of core 1's cut's bug, but not a bug of 
coreutils. Because I download the coreutils from gnu and complie
it, the cut has no this problem.

Version-Release number of selected component (if applicable):
coreutils-5.0-34.1

How reproducible:
Always

Steps to Reproduce:
1.Create two file:
$ cat file1
1 abc
2 def
3 ghi
4 jkl
$ cat file2
a 123
b 456 
c 789
d 248
2.Set the locale to
LANG=zh_CN.GB18030
LC_CTYPE=zh_CN.GB18030
LC_NUMERIC="zh_CN.GB18030"
LC_TIME=en_US.UTF-8
LC_COLLATE="zh_CN.GB18030"
LC_MONETARY="zh_CN.GB18030"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="zh_CN.GB18030"
LC_NAME="zh_CN.GB18030"
LC_ADDRESS="zh_CN.GB18030"
LC_TELEPHONE="zh_CN.GB18030"
LC_MEASUREMENT="zh_CN.GB18030"
LC_IDENTIFICATION="zh_CN.GB18030"
LC_ALL=

3. Execute this command:
$ cut -d " " -f 1 file1 file2
    

Actual Results:  the command give this result
1
2
3
4
\n

Expected Results:  1
2
3
4
a
b
c
d

Additional info:

I think this is a bug of core 1's cut, but not a bug of 
coreutils. Because I download the coreutils from gnu and complie
it, the cut has no this problem.

Comment 8 Red Hat Bugzilla 2005-09-28 17:02:55 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-544.html


Comment 9 Tim Waugh 2005-10-04 14:18:06 UTC
*** Bug 167018 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.