Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6534955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:18:49+00:00 2026-05-25T10:18:49+00:00

Need Within a Debian/Ubuntu OS, I need to print (to STDOUT) a file with

  • 0

Need
Within a Debian/Ubuntu OS, I need to print (to STDOUT) a file with embed format interprated by the pager (I’m using “most”) but it does not interpolate colors properly. All foreground colors appear white colored even if defined as black or red or green or whatever in the file. I can’t find the pager setup to force the use of the file formats.

Questions :
Is there an option to force the pager “most” to using the file formats ?
or
Shall I use another pager (than currently “most”) ?

Some details : myfile content example :

481\tparameter.foo.bar\t\033[1;32m\033[40m10.0.0.0/255.0.0.0, 172.16.0.0/255.240.0.0\t\033[1;31m\033[40m10.0.0.0/255.0.0.0,192.168.0.0/255.255.255.0\033[00m\n    

Works (colors are correctly interpreted when not using the pager)

echo -e $(cat myfile)  

Does not work (foreground colors appear white using the pager “most”)

echo -e $(cat myfile) | most  

or

echo -e $(cat myfile) | pager  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:18:50+00:00Added an answer on May 25, 2026 at 10:18 am

    This is the solution I devised to get file coloring in the shell.
    First, install the package source-highlight

        alex@dionisos:wikimodels$ sudo apt-get install source-highlight
    

    Then create a script named colorcat with the following content

        #!/bin/sh
        /usr/share/source-highlight/src-hilite-lesspipe.sh $*
    

    and save it on your $PATH. I used ~/bin for that but /usr/local/bin is also a good choice.

    Make the colorcat script executable

        alex@dionisos:wikimodels$ chmod +x ~/bin/colorcat
    

    And then just do

        alex@dionisos:wikimodels$ colorcat Comments.scala | most
    

    and it will be shown with pretty colors.

    You can also do

        alex@dionisos:wikimodels$ colorcat Comments.scala
    

    for small files if you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to locate the node within an xml file by its value using
I need to do some simple video editing within a Java application, but the
I need to download a text file from the internet using C#. The file
I need html - java script / jquery charts using single file. What do
I am using a Java based Portal Platform. I need to show within my
I have a CSV file listing items that I need to store within the
I have a modal window using jqmodal. I need a button within that modal
In my python script, I need to call within a for loop an executable,
I need to calculate the within and between run variances from some data as
I need to set the text within a DIV element dynamically. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.