Computing.Net > Forums > Unix > unix scripting

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

unix scripting

Reply to Message Icon

Name: karen
Date: April 2, 2003 at 03:30:57 Pacific
OS: Windows XP
CPU/Ram: AMD duron/ 256 ram
Comment:

Hi,


I'm having problems with unix script programming. I need to be able to write a basic addition expression, and be able to read values from a command line like ./add 3 4 5.

Thankyou.



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: April 2, 2003 at 04:16:10 Pacific
Reply:

Karen,

How about you post the code you have so far and let the people here make suggestions || comments. Please point out the section of code you are having difficulty with.


0

Response Number 2
Name: WilliamRobertson
Date: April 2, 2003 at 08:08:58 Pacific
Reply:

In Korn shell you define arithmetic expressions within double round brackets, e.g:

integer x=1 y=2 z=3
(( x = y + z ))
(( x += y ))
print $x + $y = $(( x + y ))

Hope that helps.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: unix scripting

Unix Script ignoring cmd line vars www.computing.net/answers/unix/unix-script-ignoring-cmd-line-vars/6193.html

Run a Unix Script from VB or ASP www.computing.net/answers/unix/run-a-unix-script-from-vb-or-asp-/4384.html

help redoing unix script student db www.computing.net/answers/unix/help-redoing-unix-script-student-db/5151.html