エコーセンテンスの途中で1つの単語を着色したいですが、これを達成できないようです。エコーを使用したバッシュカラーの1語
これは動作します:
#!/bin/bash
wipe="\033[1m\033[0m"
yellow='\E[1;33'
echo -e "$yellow"
echo Hello World
echo -e "$wipe"
しかし、これはしません:私は愚かな間違っ
#!/bin/bash
wipe="\033[1m\033[0m"
yellow='\E[1;33'
black="40m"
echo -e "Output a $yellow coloured $wipe word."
# or
echo -e "Output a ${yellow} coloured ${wipe} word."
何をしているのですか? :)
おかげで、それを知らなかったし、それが動作します! +1 @nooodl – nsd
ありがとうnooodlは、今働いています:) – Zippyduda