I have some ASCII art over multiple lines of a printf command eg:
printf %s '
\ /
\ /
\/
'
and I would like to make each line a different colour. I have tried the obvious \e[31m but this doesn't work because I need the printf command to print as a string (%s) and ignore backslashes, because of my ASCII art. I have also tried this:
r="\e1;[31m"
e="\e[0m"
a='\ /'
b=' \ /'
c=' \/'
printf $r%s$e "$a"
with no luck. Is this possible at all? Thank you.