[BusyBox 0006254]: tac allows stdin to be specified more than once (mismatch with coreutils)

bugs at busybox.net bugs at busybox.net
Wed Nov 12 22:21:34 UTC 2008


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=6254 
====================================================================== 
Reported By:                pgbovine
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   6254
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             11-11-2008 13:30 PST
Last Modified:              11-12-2008 14:21 PST
====================================================================== 
Summary:                    tac allows stdin to be specified more than once
(mismatch with coreutils)
Description: 
the '-' argument to tac tells it to read from stdin.  coreutils does not
allow '-' to be specified more than once in a given invocation.  e.g.,:

Coreutils behavior:

$ echo 'hello' | tac -
hello
$ echo $?
0

(regular behavior, exits with successful 0 exitcode)

$ echo 'hello' | tac - -
tac: cannot create temporary file `/tmp/tacBdLMmJ': Invalid argument
hello
$ echo $?
1

(error due to second '-', exits with 1)

In contrast, busybox doesn't seem to complain about the extra '-':

Busybox behavior:

$ echo 'hello' | ./busybox tac -
hello
$ echo $?
0

$ echo 'hello' | ./busybox tac - -
hello
$ echo $?
0

====================================================================== 

---------------------------------------------------------------------- 
 vda - 11-11-08 13:34  
---------------------------------------------------------------------- 
Do you think this is a problem and there are users which demand "tac - -"
to fail? 

---------------------------------------------------------------------- 
 vda - 11-12-08 14:21  
---------------------------------------------------------------------- 
I think this is not a bug. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-11-08 13:30  pgbovine       New Issue                                    
11-11-08 13:30  pgbovine       Status                   new => assigned     
11-11-08 13:30  pgbovine       Assigned To               => BusyBox         
11-11-08 13:34  vda            Note Added: 0015444                          
11-12-08 14:21  vda            Status                   assigned => closed  
11-12-08 14:21  vda            Note Added: 0015634                          
======================================================================




More information about the busybox-cvs mailing list