bin/fork

19 lines
281 B
Bash
Executable File

#! /bin/sh
#
# fork
# Fork a task to bg without terminal spew
# Copyright (C) 2019 Vintage Salt <rehashedsalt@cock.li>
#
# Distributed under terms of the MIT license.
#
if [ -z "$@" ]; then
printf "$0: requires argument\\n"
fi
(
exec 0>/dev/null 1>&0 2>&0 "$@"
)&
disown
exit 0