User Tools

Site Tools


bash_coloration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
bash_coloration [2016/03/04 11:52] – created ssm2017bash_coloration [2022/02/07 13:29] (current) – external edit 127.0.0.1
Line 30: Line 30:
  
 echo -e "${ColGreenF}Here is a green text.${ColReset}" echo -e "${ColGreenF}Here is a green text.${ColReset}"
 +</sxh>
 +Another version compatible with "read" :
 +<sxh bash>
 +ColRedF=$'\e[31m';
 +ColReset=$'\e[0m';
 +read -p "${ColRedF}Foobar${ColReset}:" foobar
 +echo -e ${ColRedF}Foobar${ColReset}"
 </sxh> </sxh>
 {{tag>bash}} {{tag>bash}}
bash_coloration.1457088775.txt.gz · Last modified: (external edit)