I'm trying to execute the following shell command in Python:
echo abc && echo -ne \\x00 > file && echo efg
I tried doing it by calling os.system
but it seems to ignore the -ne
flag of echo
.
What can I do to run it properly?
import os
os.system('echo abc && echo -ne \\x00 > file && echo efg')