Question: I am trying to disable RHN check when running yum on 1000 servers. It is done by:

Editing this file `/etc/yum/pluginconf.d/rhnplugin.conf`

```
[main]
enabled = 0 

```

I wrote a script to do this remotely. We are using individual accounts and I need to execute this command using SUDO:

```
for HOST in $(cat serverlist ) ; do echo $HOST; ssh -o ConnectTimeout=5 -oStrictHostKeyChecking=no $HOST -t 'sudo cp /etc/yum/pluginconf.d/rhnplugin.conf /etc/yum/pluginconf.d/rhnplugin.$(date +%F) ; sudo sed -i -e "s/1/0/g" /etc/yum/pluginconf.d/rhnplugin.conf ' ; done

```

I know it is a long line but why does it not work? 

All individual commands work on their own 

```
sudo cp /etc/yum/pluginconf.d/rhnplugin.conf /etc/yum/pluginconf.d/rhnplugin.$(date +%F)

sudo sed -i -e "s/1/0/g" /etc/yum/pluginconf.d/rhnplugin.conf

```

have tried escaping the special chars: 

```
sudo sed -i -e "s\/1\/0\/g" /etc/yum/pluginconf.d/rhnplugin.conf

```

But I get an error all the time:

```
sed: -e expression #1, char 1: unknown command: `?'

```

Thanks for your help.

Answer: 
To do that you have to replace the words that you want to bold with `<b>Word</b>`,
you do that in your controller:

```
$scope.$watch('textInput', function(){
  $scope.formattedText = $scope.textInput.replace(/(Hello|SomeWord|OtherWord)/ig, "<b>$1</b>");
});

```

And in the template

```
<div ng-bind-html="formattedText"></div>

```

\*I used Regex to replace the words, `$1` is the matched word

\*`ng-bind-html` directive to render as HTML and not as a **plain text**, it's kind of security by AngularJS, it don't let you put HTML directly in the `{{ formattedText }}`
Yes. You can achieve it by using `NgModelController` (create a directive and use `require` property to get access to this controller).

[Here is a nice example](https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#custom-control-example) which intercepts the input and change it just before it is rendered, by implementing `$render` method on the required controller.

Another example that renders an input text into a bold one: <http://jsbin.com/moxosorola/1/edit>

Note that it does not change the value of the `ngModel` itself, but render it (the same `ngModel`) in the way you want to display it by using the custom directive (`bold-render`).