powertux/bin/phantom
2024-03-20 13:51:31 +01:00

20 lines
407 B
Python
Executable File

#!/bin/python
#
# This module aims to be an easy way to run things detaching both output and process
# It requires a $1
#
#
import os
import sys
print(len(sys.argv))
if len(sys.argv) != 2:
print("Error: no argument provided or too many arguments provided.\nUse 'something like this' to execute commands with spaces.")
exit()
print(sys.argv[1])
os.system(sys.argv[1] + " </dev/null &>/dev/null &")