Sponsored Content
Operating Systems HP-UX Outputting colours in HP-UX scripts Post 302759011 by wisecracker on Monday 21st of January 2013 09:08:02 AM
Old 01-21-2013
Hi neilharvey...

Take a look at how I do it here on a default Linux shell/terminal:-

https://www.unix.com/shell-programmin...generator.html

Your first reset esc sequence should read "\033[0m" for a reset to the default colours...

Hope this helps...

---------- Post updated at 02:08 PM ---------- Previous update was at 12:46 PM ----------

Also try this as a starting point...
Code:
# Note double backslash...

printf "\\x1B[1;32;40m Some text...\n" > text.txt

cat text.txt

Hope this is helpful...

Bazza, G0LCU...

Last edited by radoulov; 01-21-2013 at 10:10 AM.. Reason: Code tags!
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Use of colours.

Any chance you might change the icon's that indicate New/No New Posts in the forum. For those who suffer colour blindness of varrying degrees it has become a bit of a problem (myself included) with the new colour scheme. Cheers, Cameron (4 Replies)
Discussion started by: Cameron
4 Replies

2. Shell Programming and Scripting

Colours

There has been a previous question about displaying text in different colours using a script in Bourne - this doesn't seem to work the same for Korn... Is it possible to display text in different colours when using the Korn shell or am I doing it wrong? (3 Replies)
Discussion started by: dbrundrett
3 Replies

3. Shell Programming and Scripting

Can i add colours to bourne Script ?

Can i add colours to bourne Script ? (22 Replies)
Discussion started by: XXXXXXXXXX
22 Replies

4. UNIX for Advanced & Expert Users

How to set background colours for a cygwin console

Hi, I need to set the background colors for cygwin console, when I do ssh to production boxes. This should be done through commands.. Please suggest me asap. Thanks in advance. (3 Replies)
Discussion started by: praveen_b744
3 Replies

5. Solaris

putty to change screen colours

Can any one tell me how to change the screen colors of the screen when connected unix using putty. I tryed setting from colors but it's not happening (2 Replies)
Discussion started by: svenkatareddy
2 Replies

6. Shell Programming and Scripting

Outputting to table

I have information in a file called HITS. This file has been populated by the user entering search criteria. the HITS file contains information: filname.hits: 123.33.345.66 Fri Nov 26 11.45.56.43 GMT 2006 at the moment i am just displayin the information using cat HITS. ... (3 Replies)
Discussion started by: amatuer_lee_3
3 Replies

7. UNIX for Dummies Questions & Answers

getting input, then outputting it

Hi! I am a newbie to Unix. I was writing a little game program for fun when thought of an idea to allow data to be saved. I knew to take all of the Predefined variables and put them into a separate file, then including the file in the program. But I am having trouble making it so that the user... (0 Replies)
Discussion started by: signebedi
0 Replies

8. Shell Programming and Scripting

To print a line in colours.

Hi all, In my script output, I want to print a line with blue colour, if the condition is satisfied, otherwise it should print with red colour. Can anyone please help me on the same requirment. Thank You. Regards, Raghu. (1 Reply)
Discussion started by: raghu.iv85
1 Replies

9. Shell Programming and Scripting

FONT colours

Hi, I have set the following piece of code in .vimrc file. ================================================ if has("terminfo") let &t_Co=16 let &t_AB="\<Esc> ================================================= unable to understand the significance of certain things. This sets the colour... (4 Replies)
Discussion started by: rac
4 Replies

10. UNIX for Dummies Questions & Answers

How to change colours in Linux Terminal Xfce?

Hi all - just started using Linux Mint 17 and I need to change the Foreground & Background Colours for the Terminal, my eyesight is not what it used to be many years ago, so any help would be much appreciated. Regards Malcolm (6 Replies)
Discussion started by: electrocad
6 Replies
GTYPIST(1)							   User Commands							GTYPIST(1)

NAME
gtypist - a typing tutor with lessons for different keyboards and languages SYNOPSIS
gtypist [ options... ] [ script-file ] DESCRIPTION
`gtypist' is a typing tutor with several lessons for different keyboards and languages. New lessons can be written by the user easily. OPTIONS
-b --personal-best track personal best typing speeds -e % --max-error=% default maximum error percentage (default 3.0); valid values are between 0.0 and 100.0 -n --notimer turn off WPM timer in drills -t --term-cursor use the terminal's hardware cursor -f P --curs-flash=P cursor flash period P*.1 sec (default 10); valid values are between 0 and 512; this is ignored if -t is specified -c F,B --colours=F,B set initial display colours where available -s --silent don't beep on errors -q --quiet same as -s, --silent -l L --start-label=L start the lesson at label 'L' -w --word-processor try to mimic word processors -k --no-skip forbid the user to skip exercises -i --show-errors highlight errors with reverse video -h --help print this message -v --version output version information and exit -S --always-sure do not ask confirmation questions --banner-colors=F,B,P,V set top banner colours (background, foreground, package and version respectively) --scoring=wpm,cpm set scoring mode (words per minute or characters per minute) If not supplied, script-file defaults to '/usr/local/share/gtypist/gtypist.typ'. The path $GTYPIST_PATH is searched for script files. EXAMPLES
To run the default lesson in english `gtypist.typ': gtypist To run the lesson in spanish: gtypist esp.typ To instruct gtypist to look for lesson `bar.typ' in a non standard directory: GTYPIST_PATH="/home/foo" gtypist bar.typ To run the lesson in the file `test.typ' of directory `temp', starting at label `TEST1', using the terminal's cursor, and run silently: gtypist -t -q -l TEST1 /temp/test.typ AUTHOR
Written by Simon Baldwin REPORTING BUGS
Report bugs to bug-gtypist@gnu.org COPYRIGHT
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Simon Baldwin. Copyright (C) 2003, 2004, 2008, 2011 GNU Typist Development Team. This program comes with ABSOLUTELY NO WARRANTY; for details please see the file 'COPYING' supplied with the source code. This is free software, and you are welcome to redistribute it under certain conditions; again, see 'COPYING' for details. This program is released under the GNU General Public License. SEE ALSO
The full documentation for gtypist is maintained as a Texinfo manual. If the info and gtypist programs are properly installed at your site, the command info gtypist should give you access to the complete manual. gtypist 2.9.1 November 2011 GTYPIST(1)
All times are GMT -4. The time now is 10:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy