Thanks for the answers guys! I'm almost there.
The only problem is that NOTHING is suppose to be just nothing which means no parameter/argument at all. How do I achive that? I have really no idea..Code:#!/bin/bash case $1 in start) echo 'Startning irctor...' /home/erikw/.screen-start.sh ;; stop) echo 'Stopping irctor...' screen -S irctor -X quit ;; NOTHING) echo 'Attaching irctor...' screen -x irctor ;; esac
Thanks.
Edit.
Maybe you should put everything in a if statement that checks if any arguments exists: but I have no idea about how to make that either :/
Edit 2.
I got some answers on some IRC channels. NOTHING shall be replaced with "" which makes the problems solved!




Bookmarks