The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell script answer prompts? eltinator Shell Programming and Scripting 4 08-29-2007 11:15 AM
screen display help zilla30066 Shell Programming and Scripting 2 01-30-2007 07:49 PM
Shell Script Display? wmosley2 UNIX for Dummies Questions & Answers 2 12-14-2003 02:12 PM
how do you represent non integers in a shell script? TRUEST UNIX for Dummies Questions & Answers 2 05-18-2003 01:00 AM
Simple Perl Script to Screen Display Shakey21 Shell Programming and Scripting 1 04-19-2002 11:55 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-04-2008
wanyac2 wanyac2 is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 1
shell script that adds two integers and display answer on screen

please help
shell script that adds two intergers and display answer on screen
  #2 (permalink)  
Old 07-04-2008
namishtiwari namishtiwari is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2007
Location: Bangalore
Posts: 377
Quote:
Originally Posted by wanyac2 View Post
please help
shell script that adds two intergers and display answer on screen
Code:
#!/usr/bin/ksh

sum=`expr $1 + $2`
echo " the sum of the values is $sum"
namish@france => ./sample1 10 20
30
thanks
Namish
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:52 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0