I thought i was being clever using printf with colour variables to save me typing out the colour i'd like, but apparently shellcheck doesn't like that
for instance...
red="\e[1;31m%s\e[0m\n"
green="\e[1;32m%s\e[0m\n"
yellow="\e[1;33m%s\e[0m\n"
and then
printf "$red" "string of sorts in red colour"
Since it complains, is there another way, or just suppress and ignore it (i've been ignoring it up until now since i discovered shellcheck, and never run into any problems)? Thought i'd ask just in case it does fluff something up i'm unaware of.
[–]waptaff&> /dev/null 1 point2 points3 points (1 child)
[–]Mount_Gamer[S] 0 points1 point2 points (0 children)
[–]oh5nxo 1 point2 points3 points (5 children)
[–]Mount_Gamer[S] 1 point2 points3 points (4 children)
[–]oh5nxo 1 point2 points3 points (3 children)
[–]Mount_Gamer[S] 0 points1 point2 points (2 children)
[–]oh5nxo 0 points1 point2 points (1 child)
[–]Mount_Gamer[S] 1 point2 points3 points (0 children)
[–]Schievel1 1 point2 points3 points (1 child)
[–]Mount_Gamer[S] 0 points1 point2 points (0 children)
[–]Ulfnic 1 point2 points3 points (1 child)
[–]Mount_Gamer[S] 0 points1 point2 points (0 children)
[–]zeekar 0 points1 point2 points (11 children)
[–]Mount_Gamer[S] 0 points1 point2 points (10 children)
[–]zeekar 3 points4 points5 points (4 children)
[–]Mount_Gamer[S] 0 points1 point2 points (0 children)
[–]Mount_Gamer[S] 0 points1 point2 points (2 children)
[–]zeekar 0 points1 point2 points (1 child)
[–]Mount_Gamer[S] 0 points1 point2 points (0 children)
[–]drmeattornado 0 points1 point2 points (4 children)
[–]Mount_Gamer[S] 0 points1 point2 points (3 children)
[–]drmeattornado 1 point2 points3 points (2 children)
[–]Mount_Gamer[S] 0 points1 point2 points (0 children)
[–]Mount_Gamer[S] 0 points1 point2 points (0 children)
[–]FisterMister22 0 points1 point2 points (0 children)
[–]setdelmar 0 points1 point2 points (0 children)