Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Closed Thread
  Search this Thread
Old 10-17-2006, 09:51 AM   #1
LQ Newbie
Registered: Oct 2006
Posts: 2

Rep: Reputation: 0
Bash script help

Im trying to write a script that adds up all even numbers, so that when its run, it will ask the person to enter a number, then from 0 to what ever number, it will add up all the even numbers. The script has to have "while loop" integer comparison and sum, and user input. I know it might be a little confusing, but thanks for the help.
Old 10-17-2006, 10:08 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,905

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Download the "Bash Guide for Beginners" and the "Advanced Bash-Scripting Guide". It's all explained.
Old 10-17-2006, 11:47 AM   #3
Registered: Aug 2002
Posts: 16,692

Rep: Reputation: 2045Reputation: 2045Reputation: 2045Reputation: 2045Reputation: 2045Reputation: 2045Reputation: 2045Reputation: 2045Reputation: 2045Reputation: 2045Reputation: 2045
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

This appears to be a homework problem which is against the LQ rules.
Old 10-18-2006, 02:53 AM   #4
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
Closed the original because the dupe was in the more suitable forum

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
building a bash script from an install script paranoid times Programming 6 07-29-2006 03:24 AM
Bash script - executing a script through subdirectories bubkus_jones Programming 5 04-24-2006 05:05 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
bash script - incrementing a filename in a script tslinux Programming 10 08-05-2003 11:58 PM
bash script prob: how can i tell the script that a 'dd' has finished? Frustin Linux - General 2 04-02-2003 05:34 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration