| | |
Colored output in bash?
![]() |
•
•
Join Date: Sep 2005
Posts: 133
Reputation:
Solved Threads: 58
Hi!
Use escape sequences: echo -e '\E[color1;color2mYour Text.'
(color1 is the foreground, color2 the background color)
Regards, mawe
Use escape sequences: echo -e '\E[color1;color2mYour Text.'
(color1 is the foreground, color2 the background color)
Shell Scripting Syntax (Toggle Plain Text)
echo -e '\E[30m black \E[31mred \E[32mgreen \E[33myellow \E[34mblue \E[35mmagenta \E[36mcyan \E[37mwhite' echo -e '\E[30;41mblack on red'
Shell Scripting Syntax (Toggle Plain Text)
Color: Foreground: Background: --------------------------------------------------------- black 30 40 red 31 41 green 32 42 yellow 33 43 blue 34 44 magenta 35 45 cyan 36 46 white 37 47
![]() |
Similar Threads
- How to make colored output (C++)
- how to add a timestamp to scrolling lines? (Shell Scripting)
- big numbers in C++ 5.4455e07 (C++)
- undefined reference errors when using C++ Sockets Library (C++)
Other Threads in the Shell Scripting Forum
- Previous Thread: how to Upload files using Linux bash Shell scripting and CGI
- Next Thread: Help in shell Script(REmove lines from file)
| Thread Tools | Search this Thread |





