![]() |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
BASH SHELL : colors & watch command
Hi,
I use watch command to execute a monitoring script "probe.sh" probe uses colors like this one echo -e "\e[5;31mWARNING\e[0m" This is correctly printed using probe.sh, but not while using "watch rpobe.sh". Any idea ? Thanks ! |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: BASH SHELL : colors & watch command
On 2007-11-16, DeM Zed wrote:
> > > Hi, > > I use watch command to execute a monitoring script "probe.sh" > > probe uses colors like this one > echo -e "\e[5;31mWARNING\e[0m" > > This is correctly printed using probe.sh, but not while using "watch > rpobe.sh". man watch: BUGS ... Non-printing characters are stripped from program output. Use "cat -v" as part of the command pipeline if you want to see them. -- Chris F.A. Johnson, author | <http://cfaj.freeshell.org> Shell Scripting Recipes: | My code in this post, if any, A Problem-Solution Approach | is released under the 2005, Apress | GNU General Public Licence |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: BASH SHELL : colors & watch command
I don't understand this cat -v.
Can you show me an example ? On 16 nov, 23:38, "Chris F.A. Johnson" <> wrote: > manwatch: > > BUGS > ... > Non-printing characters are stripped from program output. Use > "cat -v" as part of thecommandpipeline if you want to see > them. > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Re: BASH SHELL : colors & watch command
On 2007-11-19, DeM Zed wrote:
> On 16 nov, 23:38, "Chris F.A. Johnson" <> wrote: > >> man watch: >> >> BUGS >> ... >> Non-printing characters are stripped from program output. Use >> "cat -v" as part of the command pipeline if you want to see >> them. >> [please don't top post] > I don't understand this cat -v. It is non-standard. See this excerpt from the POSIX spec: Historical versions of the cat utility include the options -e, -t, and -v, which permit the ends of lines, <tab>s, and invisible characters, respectively, to be rendered visible in the output. -- Chris F.A. Johnson, author | <http://cfaj.freeshell.org> Shell Scripting Recipes: | My code in this post, if any, A Problem-Solution Approach | is released under the 2005, Apress | GNU General Public Licence |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Re: BASH SHELL : colors & watch command
I don't understand this cat -v.
Can you show me an example ? On 16 nov, 23:38, "Chris F.A. Johnson" <> wrote: > manwatch: > > BUGS > ... > Non-printing characters are stripped from program output. Use > "cat -v" as part of thecommandpipeline if you want to see > them. > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
Re: BASH SHELL : colors & watch command
On 2007-11-19, DeM Zed wrote:
> On 16 nov, 23:38, "Chris F.A. Johnson" <> wrote: > >> man watch: >> >> BUGS >> ... >> Non-printing characters are stripped from program output. Use >> "cat -v" as part of the command pipeline if you want to see >> them. >> [please don't top post] > I don't understand this cat -v. It is non-standard. See this excerpt from the POSIX spec: Historical versions of the cat utility include the options -e, -t, and -v, which permit the ends of lines, <tab>s, and invisible characters, respectively, to be rendered visible in the output. -- Chris F.A. Johnson, author | <http://cfaj.freeshell.org> Shell Scripting Recipes: | My code in this post, if any, A Problem-Solution Approach | is released under the 2005, Apress | GNU General Public Licence |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |