[solved]cat with colored output?

just wondering if there is a app like cat, that outputs a file, but with vim/emacs' highlight and line numbering. (or some short of hack)
Why? well, I'm playing around with some C++ and I have multiple little files that I'd like to see on the shell before/after I run g++, and something like that would be quite useful.
Last edited by hack.augusto (2009-10-22 01:13:20)

@bl1nk
that's exactly what I imagined for highlight, thanks.
@Ghost1227
`cat -b` ignores blank lines, `cat -n` solved the problem , thanks
[update]
community/colorgcc is kinda cool too
Last edited by hack.augusto (2009-10-22 01:16:24)

Similar Messages

  • [solved]pacman output piped to grep with color result?

    Hi.  Thanks for reading. I am looking for a command with the following function:
    1. It searches only the pacakge name, not the description.
    2. However, when a package's name matches the search pattern, it shows the description of this package as well.
    After searching in the forum, now I am using something like:
    pacman -Ss test_string | grep --color=always -B1 -v '^ ' | less -R
    It works nicely in terms of my two requirements. However, I could not get the color output (I have pacman color option) from pacaman even if I used less.
    On the contrary, the following command has normal color output
    ls --color | grep test_string | less -R
    Did I do anything wrong?
    Thanks...
    Last edited by shallpion (2013-09-22 04:55:33)

    Mr.Elendig wrote:
    shallpion wrote:Did I do anything wrong?
    Yes, you are not using expac.
    expac -S '%r/%n\n %d' python
    extra/python
    Next generation of the python high-level scripting language
    community/pypy3
    A Python3 implementation written in Python, JIT enabled
    Note that it will match provides as well as the package name.
    Sidenote: kittypack will 'soon' have this feature too, but it uses https://archlinux.org/packages so it is independent of the status of your sync db.
    Sorry I am confused... I know expac but it doesn't look like the function I was looking for... I wanted to search those packages whose *name* contains a string. For example the pypy3 is not what I wanted since it only has "python" in its description...

  • Inner table output to Excel with colored cells?

    Hi!
    I would like to output my inner table into Excel ducoment.
    And it is important to have Excel document with colored cells.
    I have searched for this solution, but could not find...
    Any help will be awarded!
    Kind regards, M.

    Hi,
    You can use function module "XXL_SIMPLE_API"
    or alternatively use "XXL_FULL_API".
    On the import, parameter name "N_KEY_COLS" is used to colour fields. The headings are automatically coloured. 1 is the default value.
    This reply is nearly 1 year after the last post
    Regards,
    Daniel

  • [SOLVED]How to get colorful output when pipe yaourt's STDIO to less?

    Hello, second post to NC.
    My question is how to get a piped(e.g. pipe yaourt's STDOUT to less) program's colorful output on screen without such option like '--color=always'.
    Before post this, I've configured less's default behaviour in "~/.zshrc" with following
    less() {
    env LESS=R less "$@"
    And When I run:
    $ dmesg --color=always | less
    Everything works fine(I get good, colorful output), but when I run this:
    $ yaourt -Qe --date | less
    Seems that I can only get grey output on terminal emulator (without 'less' I get colorful output).
    Does anyone has idea about getting yaourt's colorful output with 'less' ?
    Last edited by izmntuk (2014-06-08 00:15:15)

    Thanks for reply and after serveral mintues googling & getting some help from IRC:
    It seems that there're some utilities that do not provide such a option like 'color=always', what we need to do is trick these utilities into thinking their's STDIO is to a tty, not a pipe.
    1. stdoutisatty way (aur/stdoutisatty-git is needed) from [0]:
    $ stdoutisatty yaourt -Qe --date | less
    2. socat way (extra/socat is needed, sometimes doesn't work fine) from [1]:
    $ socat EXEC:"yaourt -Qe --date",pty STDIO | less
    3. script way (sometimes doesn't work fine) from [2]:
    $ script -fqc 'yaourt -Qe --date' | less
    4. unbuffer way (extra/expect is needed) from [3]:
    $ unbuffer yaourt -Qe --date | less
    5. zpty way (extra/zsh is needed) slightly modified from [4]:
    zmodload zsh/zpty
    autoload colors && colors
    pty() {
    local VERSION=0.2
    if [[ -t 0 && $# -ne 0 && ${1} != '--help' ]];then
    zpty pty-${UID} ${1+"$@"}
    ## when piping function pty to a pager, it may be a good idea to disable ^C *in this function*. assume that you're going to run this command: pty ls -alRi --color | less
    ## and now you enter a pager, and you press the End key by accident, and the pager seems stuck, and to get unstuck you pressed ^C, then the entire function interrupted. so to avoid the interrupt:
    if [[ ! -t 1 ]];then
    setopt local_traps
    trap '' INT
    zpty -r pty-${UID}
    else
    zpty -r pty-${UID}
    fi
    zpty -d pty-${UID}
    elif [[ $# -eq 1 && ${1} == '--version' ]];then
    print "pty v${VERSION}"
    else
    _-automatic-colored
    print "${bldblu}Usage: ${bldgrn}pty${rst} ${bldcyn}command${rst} [${bldcyn}argv${rst}...]
    wrapper function to run a program under pseudo-terminal
    ${bldcyn}--help${rst} print help message
    ${bldcyn}--version${rst} print version"
    fi
    ptypg() {
    if [[ -t 0 && $# -ne 0 && ${1} != '--help' ]];then
    pty $@ | pg
    else
    _-automatic-colored
    print "${bldblu}Usage: ${bldgrn}ptypg${rst} ${bldcyn}command${rst} [${bldcyn}argv${rst}...]
    wrapper function to run a program under pseudo-terminal and view its output in pg
    ${bldcyn}--help${rst} print help message"
    fi
    _-automatic-colored() {
    if [[ "${1}" == unset || ! -t 1 ]];then
    unset rst bld bldwht bldblk bldred bldgrn bldylw bldblu bldcyn blk red grn ylw blu cyn gry
    return 0
    elif [[ -t 1 ]];then
    rst="${reset_color}"
    bld="${fg_bold[default]}"
    bldwht="${fg_bold[white]}"
    bldblk="$fg_bold[black]"
    bldred="$fg_bold[red]"
    bldgrn="$fg_bold[green]"
    bldylw="$fg_bold[yellow]"
    bldblu="$fg_bold[blue]"
    bldcyn="$fg_bold[cyan]"
    gry="${fg[white]}"
    blk="$fg[black]"
    red="$fg[red]"
    grn="$fg[green]"
    ylw="$fg[yellow]"
    blu="$fg[blue]"
    cyn="$fg[cyan]"
    return 0
    fi
    $ pty yaourt -Qe --date | less
    $ ptypg yaourt -Qe --date
    And if there are any better implementation please leave a comment add it to wiki .
    Last edited by izmntuk (2014-08-19 14:18:45)

  • Problem with Excel output format

    Hi Guys,
    I am creating a report in XML Publisher (not standalone). I am facing some problems could anyone please help me to figure out the issues.
    Is it possible to have all three output format (PDF, HTML & EXCEL) exact (same aligned) only by creating a single RTF Template? I am facing the problem with Excel output format the output format of excel is taking excels cell formatting.
    Example Numeric fields --> Right Aligned, text fields --> Left Aligned
    One more issue with excel is -ve(negative) values are getting displayed in red and in brackets like ($13) (with red color).
    Our client want excel output on priority.
    Is there any limitation for excel output format of reports?
    It is very urgent for us please help.
    Any help would be highly appreciated.
    Thanks,
    Pragati
    Edited by: user11237443 on Aug 27, 2009 1:22 AM

    Hi Mahi,
    Thanks for your response. But i could not understand how can we write wrapper program could you please give some light on this or provide some link it would be helpful for me:-)
    I have read that blog for excel limitations but i have more question?
    1) What about the negative values?
    if any field is displaying negative amount then excel not displaying right value for that:(
    2)How can we align header or data?
    Do XMLP with EBS provide any solution for formatting in excel?
    3) If for the alignment of numeric value we concatenate them with any special character then how can we perform calculation that field?
    Here are so many formatting issues do we need to write any code in xml for that?
    Please help.
    Many Thanks,
    Pragati

  • IPod with Color will not connect to G5

    I recently bought a used iPod with Color display with a 60 GB drive for use in the car. I have a BMW with the cable that accommodates an iPod. I plugged it into the G5 with all my music on it and.... nothing.
    I tried plugging it into my work PC and it connected. Then I went over to my daughter's new iMac and it connected perfectly. While I was there, I decided to "restore" the iPod since it was used and I was not sure what might have been on it previously. Restore went great.
    Went over to my G5 and plugged it in. This is when it gets weird. As many of you know the G5 has three USB ports. One conveniently located in front and two in back. Obviously my first try was the one in front...... again, nothing. So I tried the two in back. The top one gave me..... nothing. But the bottom one seemed to like the iPod and it connected. I gave the iPod a new name and merrily started loading it up with music. I got 4 or 5GB worth onto it when all of a sudden I got the dreaded "Device Removal" warning.
    I sort of froze and wondered what to do next. Since I had already gotten the "Device removal" warning I decided that unplugging it would be ok. So I did so and wait a few minutes before connecting the iPod once more. It connected alright but now I got a message saying that "iTunes cannot read the content of iPod "iPod Color". Go to summary tab in iPod preferences and click Restore to restore this iPod to factory settings".
    So I click OK and look at the summary. The iPod is listed on the left under devices but now the name is displayed simply as "iPod" and not iPod Color as I had named it. Capacity is n/a (can't read it) and software version is shown as 1.2.1. Serial number is also listed. I hadn't transferred much music onto it yet so I decided to just go ahead and restore it.
    I got the "Are you sure you want to restore the iPod.." message and I click "restore". At this moment nothing happens for about 2 minutes. iTunes is frozen and then I get a message that pops up and says, "The iPod "iPod" (note the wrong name) could not be restored because it could not be found". I click ok, I unmount the iPod and here we sit.
    I have tried this over and over several times on this G5 with EXACTLY the same results. I have tried two other cables and we get the same thing. I also tried restarting the G5 with the iPod plugged into the USB port that works and got the same thing with one minor variation. When I went to restore the iPod this time, it actually started the process. We got the blue horizontal barber shop pole and I really though we had a break through, but after about 15 seconds I got the message that "The iPod "iPod" (still the wrong name) could not be restored because it could not be found.
    I'm not quite sure what to try next. I can't decide if the problem is with the OS (USB ports not all working) iTunes itself (maybe I can install a different version?) of the iPod. The iPod by the way was sold to me by a guy on eBay who reconditions the devices. He seems pretty competent so I think the iPod itself is in good working order.
    Anyone have any suggestions? I appreciate your ideas.
    John

    Physician - heal thyself!!!!!!
    Well after pick away at this problem for a few weeks (alone) I think I have solved the problem. Through my countless iterations of trying every combination of plugging and unplugging various USB devices in various USB ports, I realized that the one combination I had not tried was unplugging EVERY device from the G5 itself including the keyboard. But wait, I need the keyboard to input text into the computer don't I? I had completely forgotten that there are two USB ports on the back of my Apple monitor. So I plugged the keyboard into the port on the monitor and guess what? The G5 not only recognized the iPod but allowed me to restore factory settings and actually sych it with iTunes.
    So, what I learned is that this G5 will not work with this 60 GB iPod with Color screen unless it is the ONLY USB device plugged into tone of the three USB ports. Right - I am sure the Apple Engineers view this as a "feature". Shyaa - right!
    Well, it not idea but at least it works. It's pain to unplug every other USB device when you want to sych your iPod but I suppose that's the price we pay.
    Is the question answered? No, not really. I still don't know if it's a hardware problem, an OSX problem, or an iPod problem. My guess is that since it's a G5 running a Power PC chip, the fellas at Apple won't give this a second look.

  • Need help on resolving the issue with adobe output server - error MSG256 & MSG 210 not in .ini file

    Hi,
    I am using adobe output designer 5.5 for designing the label template and using the Adobe output server for printing process.
    In the Jfmerge.ini we given the condition "DiscardUnknownFields=Yes" for ignoring the unwanted fields in the .dat file.
    During the process, I faced some issue with the output server in printing the labels.
    When the .dat file is placed in the Data folder of adobe, the label is not getting printed in the printer.
    The file is move to the error folder and an error file is getting generated which contains the error message as given below:
    090826 02:59:02 D:\Program Files\Adobe\Central\Bin\jfmerge: [256]** Message Msg256 not in .ini file **
    090826 02:59:02 D:\Program Files\Adobe\Central\Bin\jfmerge: [210]** Message Msg210 not in .ini file **
    2009/08/26 02:59:02 D:\Program Files\Adobe\Central\Bin\jfserver.exe: [314]Agent exit message: [210]** Message Msg210 not in .ini file **
    The output server is a new installtion and I verified the Jfmerge.ini file. It contains the message details of Msg256 and Msg210.
    I also verified the license and it is a valid licence.
    Kindly help me out in solving this issue.
    Thanks
    Senthil

    I assume this is too late to help you, but other might need a hint.  I had the same problem, and found some possible causes that I posted on http://codeznips.blogspot.com/2010/02/adobe-output-server-message-msg210-not.html.
    It is quite likely that you are missing some double quotes around the path specifying the ini file (-aii), if its installed under "Program Files".
    Hope this helps anyone....
    Vegard

  • CS5 Error with Animation Output

    Running CS5 on a Mac 10.6.4
    Every time I render, it gives the following error message:
    An output module failed. The file may be damaged or corrupted. (-1610153464)
    I've tested the files on a different machine and they open and render out fine.
    I did some searches and for some it was the dreaded Optical Flares plugin from Video CoPilot causing this same problem.
    I'm having these issues and I don't have any plugins installed.
    Re-Installed everything 3 times, trashed preferences, removed plugins from the Application support and still no luck.
    The only thing that works for me is outputting to a PNG or JPEG sequence.
    If I try to render using the Animation preset, It gives the error message.
    I also have been getting a weird "MooV" error message when I try to import certain types of quicktime files. Not all just a few random ones.
    All of this leads me to believe it may be an issue with 32 bit Quicktime.
    Any suggests on how I can get the Animation preset working again?
    Thanks.
    It gives an error message

    Sure, I had the exact problem posted at the top of this thread. Spent two days reading all the posts regarding anything that had to do with this Output Module error. I finally came upon a post of someone who was having a similar issue as I with the hang at start up. However, the post was replied to by a guy who said "Repeat the hang with only AE running,  then go to the Activity Monitor and select the QT32 Server process.   Then press the "Sample Process" button at the top of the window...It looks like both of you are having a similar problem with a third party AVI codec.  Please remove or uninstall any third party AVI codecs such as DivX,  XVid, etc. from your system and try AE again."
    "You can also temporarily disable these components by closing any QT related apps and then dragging components out of the Library/QuickTime folder on your boot drive.   If that works, try adding them back one by one until it fails again.  That is the problem codec."
    So I removed AviImporter.component from Library/Quicktime on the boot drive and these two problems were solved.
    Here is the link to the post where I found this info.
    http://forums.adobe.com/thread/634237?start=0&tstart=0

  • Problem with  Color Ghosting in CS6 but Not CS4 ?

    I have HD Footage from my Canon HV30 camcorder and when I open a project and edit the video in CS4 there is no color Ghosting, but when I open a project with the same source files and project settings in CS6 I get a nasty color ghosting. Has anyone seen or experience this issue before?   I have included and example of the same frame in each of the programs.
    Help!!

    Unfortunately I don't have another camera with HDV output. I could borrow another camera but it would be AVCHD.
    I'm not sure about any issues with the media and if there is a way to get this in front of a developer type person who would be knowledgable about the differences in how PP CS4  converts HDV source into a digital file vs how PP CS6 converts the HDV source into the digital file.  Does the PP capture process use a hard coded CODEC that is different between CS4 and CS6?
    I work in telecom and there is a huge effort to comply with standards, but interoperability is still a big issue even when there is a common governing standard. 
    Because my PP CS4 software converts and displays the "Standard Compliant" source media properly (without any Ghosting/Interlace artifacts)  my experience troubleshooting technical issues tells to ask the question  "What changed between things working and things not working?"  I am drawn to focusing on the difference introduced with CS6.
    As addressed earlier in this thread, it could possibly be interaction with display drivers (ruled out with updated drivers and because the exported files have the issue as well?). It could have been an issue with not having the latest PP CS6 software (eliminated with software update).  The only thing I have left is an interoperability issue with either my camera output having some varient in standard compliance that is causing the issue or the PP CS6 software  having some issue in interpreting or processing the streaming media input that PP CS4 did not have.
    So for my situation, here are the specifics: I am using a Canon HV30 Video camera set for 1080i  30p HDV format to tape. Within the camera I have it set for shutter priority, at 1/250 Shutter speed. Now we know there are ~30 frames per second so this faster "shutter speed" must be interpolated/converted to blend into the 30 frames. 
    To replicate/test the situation I would need (or someone else with one) a Canon HV20, HV30, or HV40 setup with the same shutter vs aperture priority recording some fast moving action.
    My bottom line is I really like working in PP CS6 and don't want to have to stay in CS4 because of this issue.  Any ideas how to escalate this issue to the developers or any other ways to move towards a resolution?   
    Thanks,

  • Trouble with color on Presario, No red tones on display. Not a monitor issue.

    Am experiencing trouble with color on Presario, model no. CQ5500F. Purchased a couple of years ago, and trouble was present immediately. Am getting no red tones - red items appear black or sometimes blue. Was told by HP that it was a monitor issue, and let computer slide out of warranty. installed new monitor today and problem still exists. Is this merely a display adjustment of some kind? Or will I have to pay HP their $99 for a one time fix? Any suggestions appreciated.

    Hello UncleBob62,
    It could be the display driver that is not properly working
    1. Click on the start icon
    2. Right click on computer and go to properties
    3. Select Device Manager
    4. Expand display adapters and right click on the video card driver and uninstall
    The computer screen will go blank
    On the keyboard press the windows key the right arrow key twice and then the letter R.
    At this point your computer is going to reboot. After the reboot Windows will install generic drivers for your video card. Do you still see a lack of red tones?
    If I have helped you in any way click the Kudos button to say Thanks.
    The community works together, click Accept as Solution on the post that solves your issue for other members of the community to benefit from the solution.
    - Friendship is magical.

  • I have Photoshop CS5 and a Epson 3880 . The print setting dialogue box won't open when selecting color output PRINTER MANAGES COLORS

    I have Photoshop CS5 and a Epson 3880 . The print setting dialogue box won't open when selecting color output PRINTER MANAGES COLORS
    It does ope when selecting PHOTOSHOP MANAGES COLOURS . This is first time in 7 year this has happened.
    Any one with ideas/

    What is your screen resolution?
    What operating system?

  • Oracle Reports - Unable to generate report with colored image in bitmap mod

    Hi,
    I am using Oracle reports 6i.
    I am generating a post script[.ps] file using bitmap mode.
    The layout contains an image. The image is stored in oracle database which is colored image.
    But when the report is generated same is being generated with gray color.
    Could any one advise on resolving this issue? The objective is to generate the report with colored image and not gray or black&white

    What kind of images do you have? Reports only supports a few formats, e.g. JFIF. So, if you have JPG images with EXIF meta information in the header, you have to remove those first.
    when the report is generated same is being generated with gray color.What happens if you sent the output directly to the printer?
    And what happens if you create a PDF file instead of Postscript?

  • Problems with colors running CS4 and W7.

    Hey everyone.
    I'm having some MASSIVE problems with colors on my system.
    Windows 7 Prof 64bit
    Photoshop CS4 64bit
    6g Ram
    1T hard drive
    Nvidia GeForce 9800 GTX+
    Dell SE198WFP Monitor 
    The system itself is a Dell Inspiron 530 that I put into a Black Widow V9 gaming tower. 
    Here is an example of the issue I'm having: 
    http://findae.deviantart.com/art/Converge-101214480
    http://i38.tinypic.com/bjcymr.jpg 
    The top image is a (admittedly old and crappy, but it shows the problem) photo that I had previously edited and put in my portfolio. The tinypic below is the result of copying that photo from the portfolio, pasting it into photoshop, and then saving it into a jpg. As you can see, the transitions between colors and the contrast are a complete mess. 
    Thing is, my hard drive recently quit on me, and I had to install the operating system and such on a new drive. I remember having this problem with the system when I first had it, but it either went away on its own or I fixed it somehow before. Now I can't remember for the life of me how I got rid of the problem, and I certainly don't know what the problem is in the first place. I'm tempted to think it may not be photoshop itself, but the problem seems to be especially bad when I'm working with photos. 
    Anyone have any idea what the problem might be and how to solve it? 
    Edit: I also noticed it when viewing http://findae.deviantart.com/gallery/#/d1hni37 in firefox, whereas the other photo appeared to be ok before I copied and pasted it. It has extremely obvious lines of green and orange in the transition from light skin tone to dark skin tone. Annoyingly enough, this doesn't show up in the thumbnail within my gallery at all, only when I click on the thumbnail and see the fullsize image. Extremely frustrating.  
    Here's another good look at the problem while selecting a color in photoshop: http://i37.tinypic.com/2h6t7gh.jpg  All I did was screenshot it a few times, and it deteriorated to that point.

    Screen glitches like color blocks appearing where they shouldn't could indicate a problem with your video drivers.
    Go to the nVidia site and see if they've released any updated drivers; people often report that updated drivers are correcting current problems with Photoshop.
    http://www.nvidia.com/object/win7-winvista-64bit-258.96-whql-driver.html
    Note the recent (3 weeks ago) release.
    -Noel

  • IWeb 09 color output messed up

    Hi,
    I have an iWeb site set up so that an iFrame photo gallery from another site is embedded inside my iweb page. Everything worked beautifully in iweb08. I have set up the embedded gallery so that the background colors are the same as the iweb page (333333) and it blends perfectly. Seems simple enough. web standard colors are web standard colors.
    I have just updated my sites to iWeb09 and everything looks great *within iWeb*. iWeb connects to the internet and the preview loads the embedded website and it looks identical to my iWeb08 site. BUT when I publish this site and view it (firefox/safari - windows and mac) the iweb-created site background suddenly appears much lighter (about 555555) than the embedded iframe gallery (333333).
    I notice that in the new iweb09 css file, colors are no longer displayed as HTML, but instead the RGB "equivalents". This seems to be the only difference between my old iweb08 css and the new iweb09 css. So I simply replaced the new with the old...Same color problems. *What am I missing?* *What could be corrupting the color output in iWeb 09??* This is really annoying and for now I should probably just revert to iweb08 on my external backup drive. I guess I'll also pick apart all of iweb09's output files to try to find the problem html or css.
    Why Apple? Why?????

    OK, so I read that support note several times from Apple and figured out how to use it as a workaround. In my case, I needed a background that was the same color as parts of the foreground elements for a seamless blend (a nav bar on the left, done with HTML snippit). It was driving me absolutely nuts trying to get a simple accurate RGB value generated from iWeb. RGB... hmmmmmm. Mucked with my snapshot color HMMMMMM....
    Ok, so RGB color spaces are commonly embedded in images, etc. I thought, well, what if iWeb is using that at the time of the assignment of a color to a object (like my stretchable square) and pre-screwing-up the color in the definition of the square? To work around, I would have to do the gamma hokie pokie so my RGB color space was something that iWeb would be happy with... generate the square of color, then set the color space back. In theory, this should give me a proper value for the square's color on output (matches what everyone sees in the &^#% browser). Badda boom, badda bing, it worked:
    Steps:
    1) set your monitor color space to sRGB IEC61966 in the System Prefs under Display, Color tab
    2) generate your evil iWeb color square of death using the Color Picker and the magnifying glass to select the onscreen color you want to match.
    3) set your monitor back to the *normal* setting (Apple Cinema Display for example)
    When you want to use that color, copy that square and paste it. It will carry the proper RGB around with it (or at least it is working for me right now...)
    Now, if anyone else uses this approach with a color different than Navy blue, please indicate and also indicate of the grey dog ear was on your problem color when this all started.

  • Problems with color printing in PSE 6.0

    I have installed a HP Premium Photosmart All-in-One Printer. It prints pictures with excellent picture and quality color when I print from My Pictures. The picture and color quality when I print from PSE Organizer is very poor. I have Color Management set to Adobe RGB. Can anyone give suggestions on what I need to do so I can print good, quality photos from Organizer? I appreciate any ideas.

    There are various opinions on how to deal with this problem. Try this:
    Print from Editor. Yes, the experts assert that the print engine differs between editor and organizer.
    Calibrate your monitor
    In Editor, Color settings>sRGB
    In printer setup>properties>print space>same as source. The idea here is that you do not want both Elements and the printer to manage the color output.

Maybe you are looking for