Question: As mentioned in the title, I'm unable to simultaneously record my headset microphone *and* my desktop audio when using SimpleScreenRecorder in KDE Neon 5.24.

In the "Audio Input" section of the recording settings, I selected "PulseAudio" as **Backend**, whereas for **Source** I've tried both "Built-in Audio Analog Stereo" as well as "Monitor of Built-in Audio Analog Stereo" (see below):

[![enter image description here](https://i.stack.imgur.com/Iagkh.png)](https://i.stack.imgur.com/Iagkh.png)

When selecting "Built-in Audio Analog Stereo", the microphone gets recorded but the desktop audio does not, while the situation is exactly the opposite when I select "Monitor of Built-in Audio Analog Stereo" (can record desktop audio but not headset microphone).

Does anybody have an idea of how to solve this issue?

Answer: 
Using any awk in any shell on every Unix box and no matter what your input values are and no matter how many lines are in each empty-line-separated record:

```
$ awk -v RS= -F'\n' -v OFS=',' '{$1=$1}1' file
St1,number1,1234
St2,number2,456

```
If the consecutive lines to join are **just** 2:

```
sed '/^$/d;N;N;y/\n/,/' test

```

* Remove all the empty lines
* Get the next two lines
* Replace all occurrence of `\n` with an `,`

---

Join all lines, not just two, separed by one or more empty lines:

```bsh
sed '
    /^$/d;:a
    H;N;$!{
    /\n$/!ba
    }
    y/\n/,/
    s/,$//
' test

```