Can sort preserve piped in colors? I'm trying to modify yaourt -Qu | sort so I get color output. Tried googling this but I couldn't find a general way nor a special way to do this for sort.


Turns out yaourt has a color option, and yaourt -Qu --color | sort works.

| improve this answer | |
  • It's not sort that removes the colors, it's yaourt. Unless told otherwise, like many programs, it only prints out in color when its output is on a terminal, not when it's a pipe (because piped output is usually for processing by a program). – Gilles 'SO- stop being evil' Dec 25 '14 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.