Results 1 to 9 of 9

Thread: Hel with easy bash script

Threaded View

  1. #7
    Join Date
    Jun 2007
    Location
    Sweden
    Beans
    28
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Hel with easy bash script

    Thanks for the answers guys! I'm almost there.

    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
    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..

    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!
    Last edited by Ballena; June 28th, 2008 at 12:57 AM.
    Goox.se - Search The Web
    "There are people who don't like capitalism, and people who don't like PCs. But there's no one who likes the PC who doesn't like Microsoft." - Bill Gates

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •