bugGNU Core Utilities - Bugs: bug #22109, Enhancement request: tr should be...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #22109: Enhancement request: tr should be able to take multiple consecutive actions

Submitted by:  Richard Neill <richardneill>
Submitted on:  Fri 25 Jan 2008 07:08:57 AM UTC  
 
Category: NoneSeverity: 1 - Wish
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 25 Jan 2008 02:52:02 PM UTC, comment #2:

Closed per response on the mailing list.

Eric Blake <ericb>
Project Administrator
Fri 25 Jan 2008 11:22:21 AM UTC, comment #1:

Could you provide some more justification than "would be nice" please?

Implementing the change you suggest would significantly complicate the implementation of tr, which is already quite fearsome; see for example the recent discussion of the correct processing of "tr [:lower:] [:upper:]" in locales where the number of upper-case letters is different to the number of lower-case letters.

Such additional complexity doesn't come for free. Somebody has to implement it, the coreutils maintainers have to take the time to understand the new implementation, they have to maintain and fix bugs in it. Then the Info documentation and the manual page need to be updated to explain the changed functionality in such a way that any corner-cases are identified. For example, what does this do?

tr -dc ABC -s

Does that do the same as this?

tr -d ABC -c -s

What about "tr -d ABC -c -s 123"? Is 123 SET1 or SET2?

I think the documentation task will be non-trivial. Non-trivial documentation will probably result, making it harder for people to understand. So everybody gets harder-to-understand documentation in the name of a convenience feature.

The complex documentation and more complex implementation opens an opportunity for the documentation to describe something slightly different to the implementation. When somebody notices the problem, which should get fixed?

But this feature could indeed be convenient. It could be sufficiently convenient for many people to use it a lot. Who will field their questions when their script doesn't work - or silently does something different - on other systems?

In summary, maybe nobody should change any piece of software, ever. Except maybe to fix bugs. Carefully. :)

James Youngman <jay>
Fri 25 Jan 2008 07:08:57 AM UTC, original submission:

It would be nice if tr could take multiple consecutive actions in a single command. For example, instead of writing

echo hello | tr h i | tr -s l | tr -d o #result: iel

it would be nice to allow:

echo hello | tr h i -s l -d o

where the operations are applied consecutively.

Thanks,

Richard

Richard Neill <richardneill>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ericb (Posted a comment)
  • -unavailable- added by jay (Posted a comment)
  • -unavailable- added by richardneill (Submitted the item)
  • -unavailable- added by richardneill
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 25 Jan 2008 02:52:02 PM UTCericbSeverity3 - Normal=>1 - Wish
      StatusNone=>Wont Fix
      Open/ClosedOpen=>Closed
    Fri 25 Jan 2008 07:08:57 AM UTCrichardneillCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1