|
colors in BASH, doubt with script
I was trying to see all combinations of foreground and background colors in BASH.
This works fine for me,
echo -e '\E[37;46m TEXT'
but when I tried the below script, the variables i and j do not expand.
#!/bin/sh
for i in `seq 30 37` # foreground
do
for j in `seq 40 47` #background
do
echo -e '\E[$i;$jm TEXT'
tput sgr0 # Reset text attributes to normal without clear
done
done
I tried
echo -e "\E[$i;$jm TEXT"
echo -e '\E["'"$i"'";"'"$j"'"m TEXT'
no luck, please help.
|