From 52fb8698badeb8bc0110b42d43e8f5362a5800b7 Mon Sep 17 00:00:00 2001 From: tcsenpai Date: Wed, 20 Mar 2024 13:01:56 +0100 Subject: [PATCH] Python is required. This module aims to be an easy way to run things detaching both output and process --- bin/phantom | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 bin/phantom diff --git a/bin/phantom b/bin/phantom new file mode 100755 index 0000000..348b014 --- /dev/null +++ b/bin/phantom @@ -0,0 +1,19 @@ +#!/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 not 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 &")