Can a Debian system have alternate utilities?

If none of the more specific forums is the right place to ask

Can a Debian system have alternate utilities?

Postby Rezadora » 2020-01-02 17:10

Hello:
I was wondering if there's a way to have different implementations of some commands apart from the GNU ones without replacing them. For example, if there's a package that install BSD utilities with a prefix or something similar to tell them apart.

My intention is to use an implementation of tr that supports multi-byte characters. Unfortunately the GNU one doesn't support them. I'm aware there are alternatives to tr but I'd like to have an alternate tr that behaves like it should do.

Is there a package that installs different implementations without replacing the ones in coreutils? Would getting an implementation that behaves correctly and putting it somewhere it can be found in the PATH be a good idea?

Thanks in advance.
Rezadora
 
Posts: 13
Joined: 2019-10-23 15:30


Re: Can a Debian system have alternate utilities?

Postby Rezadora » 2020-01-02 17:31

Head_on_a_Stick wrote:https://wiki.debian.org/DebianAlternatives

EDIT: https://packages.debian.org/buster/galternatives

Yes, this is exactly what I was looking for, thank you very much! I don't know why I didn't think of this, I've done this many times to set the default version of Java to use.

But what packages apart from coreutils contain commands? I'm afraid that if there are, they wouldn't just install a single command, right? What I just want a single command? Would it be better to just get it somewhere and include it in the PATH?
Rezadora
 
Posts: 13
Joined: 2019-10-23 15:30

Re: Can a Debian system have alternate utilities?

Postby Head_on_a_Stick » 2020-01-02 17:33

The best option is to package up your custom tr version and patch the Makefile to change the binary name thus preventing conflicts.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12511
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to General Questions

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable