Find the answer to your Linux question:
Results 1 to 5 of 5
I'm currently enrolled in a Linux class. Looking forward to making the switch (still on Windows). But right now I just need to get thru this class. Can anyone tell ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    3

    new linux user needs hand held: STDOUT color


    I'm currently enrolled in a Linux class. Looking forward to making the switch (still on Windows). But right now I just need to get thru this class. Can anyone tell me how you change the color of the standard output. I have to write a simple menu shell script and have the answer returned in a different color depending on what category the returned answer will be a part of. So...
    Thanks,

    Travix

  2. #2
    Linux User TaZMAniac's Avatar
    Join Date
    Jan 2009
    Posts
    269
    Sorry but homework questions aren't allowed here.
    And just how do you think you can get through a Linux class and not have it installed on your pc?
    Get with it and take the plunge.

  3. #3
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,025
    Welcome aboard!
    As mentioned, we won't do homework for you. But if you have a code that just didn't work properly, you could post it.
    Then, one of our scripting gurus might be able to point out where you might want to look.

    Asking for help is quite different than asking for an answer.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2012
    Posts
    3
    That's all I need is some good direction. I can't figure out how to make my shell script display the output of the calendar command in green. Here is one permutation of the command I've been using:

    cal | echo -e "\033[32m";

    But it won't let me pipe the results of cal into the echo command that's making the text green. I've rearranged every single attribute in this command. So, can anyone point to a useful page or tell me what I'm doing wrong?

    Travix

  6. #5
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Reverse your commands. This worked for me and I expect there are other ways to do it.

    Code:
    #!/bin/bash
    echo -e "\033[32m";
    cal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •