I am creating a script with Python3 that runs a couple of Linux terminal commands for me (https://github.com/stefanrows/ceos3c-baseline-installer)
Everything works so far except the following line:
os.system('sudo -u {} sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'.format(user))
I am pretty sure it has something to do with character escaping, but I don't know where exactly I have to change something.
Would be great if someone could point me in the right direction!