Article 5FTRJ Bash not printing bold text

Bash not printing bold text

by
sysmicuser
from LinuxQuestions.org on (#5FTRJ)
Hi,

I have code as below

```
sh '''#!/usr/bin/env bash
set -x
echo $SHELL
echo $TERM
bold=$(tput bold)
normal=$(tput sgr0)
echo -e "${bold}$(cat ${app_name}-virtual-service.yaml|grep -B1 "weight: 100"|grep -v "weight: 100"|cut -d':' -f2)${normal} is active"
kubectl apply -f ${app_name}-virtual-service.yaml -n ${deployment_namespace}
'''
}

Unfortunately, it does not print bold output. What surprises me is it print "dumb" value for $TERM

Please check the output below

```
+ echo /bin/bash
/bin/bash
+ echo dumb
dumb

++ tput bold
tput: No value for $TERM and no -T specified
+ bold=
++ tput sgr0
tput: No value for $TERM and no -T specified
+ normal=

cache-proxy-service.dev4-green-blue.svc.cluster.local is active
```

Any help would be much appreciated.latest?d=yIl2AUoC8zA latest?i=swd-qaoDhgo:ocnnKx03epE:F7zBnMy latest?i=swd-qaoDhgo:ocnnKx03epE:V_sGLiP latest?d=qj6IDK7rITs latest?i=swd-qaoDhgo:ocnnKx03epE:gIN9vFwswd-qaoDhgo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments