Question: I need to create custom UserControl so I can easily add some control so all control that implement CustomUserControl can affected.

This is what I do

```
public class CustomUserControl : UserControl
    {
        public CustomUserControl()
        {
            var stack = new StackPanel();
            stack.Children.Add(new TextBox() { Width = 100, Height = 100 });
            Content = stack; // need to add extra control to content
            //AddChild("test"); // this also fail
            //AddChild(stack); // this result in hard error
        }
    }

```

in the xaml

```
<control:CustomUserControl x:Class="Sample"
             xmlns:control="clr-namespace:Sample.Controls;assembly=Sample"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
            <TextBox Width="100" Height="100"/>
    </Grid>
</control:CustomUserControl>

```

I want it to show 2 textbox, but it only show one, maybe because content overrided by parent.

Answer: 
```
SSID=$1 
temp_var=$(sudo awk -v RS= '!/${SSID}/{printf $0""RT}' etc/wpa_supplicant/wpa_supplicant.conf)
echo -e "$temp_var" | sudo tee etc/wpa_supplicant/wpa_supplicant.conf

```

The temp var is needed because this is the easiest way I found to actually make awk write to he file its processing.
To see the effect of changing wpa\_supplicant.conf, do

```
svc wifi disable && svc wifi enable

```

Some references:

* <https://stackoverflow.com/a/18955226/1246369>
* <https://unix.stackexchange.com/a/89707/172003>
* <http://ubuntuforums.org/showthread.php?t=981258#3>
i was able to get it done with the below script: 

```
SSID_TO_DELETE=$1 
sed -n "1 !H 1 h $ { x s/[[:space:]]*network={\n[[:space:]]*ssid=\"${SSID_TO_DELETE}\"[^}]*}//g p }" /etc/wpa_supplicant/wpa_supplicant.conf > /etc/wpa_supplicant/wpa_supplicant.conf 

```