Find the answer to your Linux question:
Results 1 to 4 of 4
Hey everyone, I am new to linux world. My goal is to build a simple service, which recieves two numbers through a shell script and returns the sum. Please help ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    1

    Unhappy Newbi:: Creating a Service (daemon) in linux..


    Hey everyone, I am new to linux world.

    My goal is to build a simple service, which recieves two numbers through a shell script and returns the sum.

    Please help me with step by step guid or any tip/hint you find useful.


    Thanks in advance.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,639
    Quote Originally Posted by alsubject View Post
    Hey everyone, I am new to linux world.

    My goal is to build a simple service, which recieves two numbers through a shell script and returns the sum.

    Please help me with step by step guid or any tip/hint you find useful.


    Thanks in advance.
    This sounds a lot like a school exercise or homework problem, which is not allowed on these forums (see terms of use).
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    May 2012
    Posts
    43
    Quote Originally Posted by Rubberman View Post
    This sounds a lot like a school exercise or homework problem, which is not allowed on these forums (see terms of use).
    Wish my homework was as easy as that.

    Not going to solve it for you OP, but this is almost there.
    Taken from another site (can't post links until 15 posts)
    Code:
    echo -e "Hi, please type the equation: \c "; read  num; echo "The answer is: $num"
    Just change this part
    Code:
    The answer is: $num
    so it displays the variable $num as a mathematical expression.

  4. #4
    Just Joined! rukiaEnix's Avatar
    Join Date
    Jun 2012
    Location
    Mexico
    Posts
    16
    I think it really is a homework...

Posting Permissions

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