0
1
What I got:
array[0]="Programm is Running"
array[1]="programm is down"
What I want:
array[0]="Programm is \e[0;32mRunning\e[0m"
array[1]="programm is \e[0;31mDown\e[0m"
This will make things a little more colorful(using the echo -e command), atleast I hope so. I tried to replace this with:
array[$i]=${array[$i]//"running"/"\e[0;32mrunning\e[0m"}
array[$i]=${array[$i]//"down"/"\e[0;31mdown\e[0m"}
That didnt work. Error Message:
0403-011 The specified substitution is not valid for this command.
Why does that happen? What do I need to different?
Works for me, even if it doesn't produce colourful output. What version of bash are you running? – choroba – 2014-05-12T13:22:46.090