You are not logged in.

#1 2009-05-30 13:50:47

dcrabs
Member
From: Sweden
Registered: 2008-10-03
Posts: 149

[solved] How to remove color from yaourt output?

Hi everyone,

I am having a problem with removing color output from yaourt.
In order to get a list of installed packages in kdemod-core, I execute the following:

yaourt -Qs ^kdemod | grep kdemod-core | awk '{print $1}' > kdefiles.txt

Some time ago colored output was usually lost when piping commands. For some reason it is not removed anymore so that I get the following file content:

[1;35mkdemod-core/[0m[0m[1mkdemod-kde-common
[...] and so on

Of course pacman doesn't understand this anymore:

pacman -S `cat kdefiles.txt`

Btw. The same options (-Qs ) with pacman search only locally installed packages.
Any ideas?
Thanks,

David

Last edited by dcrabs (2009-05-31 10:47:57)

Offline

#2 2009-05-30 15:48:34

kumyco
Member
From: somewhere
Registered: 2008-06-23
Posts: 153
Website

Re: [solved] How to remove color from yaourt output?

yaourt --nocolor

to suppress yaourt's own colorizing

Offline

#3 2009-05-30 15:52:16

dcrabs
Member
From: Sweden
Registered: 2008-10-03
Posts: 149

Re: [solved] How to remove color from yaourt output?

kumyco wrote:
yaourt --nocolor

to suppress yaourt's own colorizing

I tried that but it doesn't solve the problem. Now everything is white but package names are bold. The result is the same. Some strange characters that shouldn't be there.

Offline

#4 2009-05-30 16:09:23

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [solved] How to remove color from yaourt output?

dcrabs wrote:

Btw. The same options (-Qs ) with pacman search only locally installed packages.
Any ideas?

pacman -Ss searches on-line.

Offline

#5 2009-05-30 16:41:57

dcrabs
Member
From: Sweden
Registered: 2008-10-03
Posts: 149

Re: [solved] How to remove color from yaourt output?

skottish wrote:
dcrabs wrote:

Btw. The same options (-Qs ) with pacman search only locally installed packages.
Any ideas?

pacman -Ss searches on-line.

Thanks, but then I don't have the packages that are installed. It is of course much faster and without color but doesn't solve my problem.

Then only thing I could find so far was a statement, that piping through less for example removes color for security reasons. That doesn't seem to be true any more.

There is a col command which outputs plain text but there are still characters left.

Offline

#6 2009-05-30 18:26:36

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: [solved] How to remove color from yaourt output?

Don't you only want the packages which are installed? What exactly is the difference between "list of installed packages" and "locally installed packages" ? Doesn't pacman -Qg kdemod-core do what you want?

Offline

#7 2009-05-30 18:39:58

dcrabs
Member
From: Sweden
Registered: 2008-10-03
Posts: 149

Re: [solved] How to remove color from yaourt output?

Garns wrote:

Don't you only want the packages which are installed? What exactly is the difference between "list of installed packages" and "locally installed packages" ? Doesn't pacman -Qg kdemod-core do what you want?

Unfortunately not cause kdemod-core is no group.

With "locally installed" I mean that it shows only packages in the group local and kdemod-core is the repository and even that doesn't work.

Last edited by dcrabs (2009-05-30 18:44:48)

Offline

#8 2009-05-31 01:17:32

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: [solved] How to remove color from yaourt output?

Sorry, my bad, somehow kdemod-core sounded more like a group than a repo. What about

pacman -Sql kdemod-core | xargs pacman -Qq 2>/dev/null

Offline

#9 2009-05-31 10:47:39

dcrabs
Member
From: Sweden
Registered: 2008-10-03
Posts: 149

Re: [solved] How to remove color from yaourt output?

Very nice! Thanks.
Much better and faster.

Offline

Board footer

Powered by FluxBB