Register
It is currently Fri Oct 31, 2014 4:50 pm

Calculator (My First Script)


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Tue May 27, 2008 5:45 pm   

Joined: Tue May 27, 2008 5:39 pm
Posts: 1
Location: New Zealand
Hey guys, I have been Bash Scripting for about an hour, and this is my first post.

#!/bin/bash

echo -n "Variable01: ";
read one;
echo "Variable01 is $one";
echo -n "Variable02: ";
read two;
echo "Variable02 is $two";
echo -n ' + - * or /?';
read chvar;

echo $[ $one $chvar $two ];

It's pretty crap really, but not bad for a first script. It actually works! :)


Top
 Profile WWW  
 PostPosted: Mon Jun 02, 2008 9:00 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 669
Location: Des Moines, Iowa
Working is good ;)


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP