Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 30 Jun 2015, 17:38
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Script color functions
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 31 May 2008
Posts: 3220

PostPosted: Mon 26 Apr 2010, 00:32    Post_subject:  Script color functions
Sub_title: Add colors to scripts

I'm sure these must be around somewhere, but in case they're not:
To load functions add ". colors" to script after saving "colors" file in $PATH. It's defaulting to black terminal background.


### example: echo -e $RED"Hello"

## Black background

 export RED='\E[31;40m'
 export WHITE='\E[37;40m'
 export GREEN='\E[32;40m'
 export YELLOW='\E[33;40m'
 export MAGENTA='\E[35;40m'
 export CYAN='\E[36;40m'
 export BLACK='\E[30;40m'

## White background

# export RED='\E[31;47m'
# export WHITE='\E[37;47m'
# export GREEN='\E[32;47m'
# export YELLOW='\E[33;47m'
# export MAGENTA='\E[35;47m'
# export CYAN='\E[36;47m'
# export BLACK='\E[30;47m'

Back to top
View user's profile Send_private_message 

Joined: 03 Apr 2007
Posts: 3422
Location: Oregon

PostPosted: Mon 26 Apr 2010, 01:59    Post_subject:  

Thank you! I have your list saved for reference.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0444s ][ Queries: 11 (0.0113s) ][ GZIP on ]