simplifying title of the screen
[feisty_meow.git] / scripts / system / screeno.sh
1 #!/bin/bash
2
3 # screeno: a simple alias for putting something in the background where its logs can be
4 # tended by the screen utility.
5
6 app="$1"; shift
7 title="$1"; shift
8 if [ -z "$app" ]; then
9 #print_instructions
10   echo This utility needs an application name to launch into the background.
11   echo The app will be managed via the screen utility so its logs are available
12   echo later, plus it can be interacted with directly.
13   exit 1
14 fi
15 if [ -z "$title" ]; then
16   title="$(basename $app)"
17 #hmmm: we should be sanitizing that guy!  don't want a weird title or a dangerous one.
18 fi
19
20 screen -L -S "$title" -d -m "$app"
21
22
23
24