LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-13-2016, 02:54 PM   #1
caramannaj
LQ Newbie
 
Registered: Oct 2016
Posts: 1

Rep: Reputation: Disabled
Questions and Guidance on creating an app/script


Hello,
This is my first time posting on this forum and wanted to get some guidance on how to create an app / script. I know very little about linux scripting but i figured this would be a good way to get my feet wet and also give me a purpose for the learning. I am wanting to build a script or an application that I can setup items and assign them point values. The enter a total point value and it builds a generated list based on the values i put in previously. If anyone knows how to accomplish this or more importantly can point me on the right path to where to find documentation on how to start building this then please let me know and it would be greatly appreciated.

Example of what i mean:

Team x = 10 points
Team y = 40 points
Team z = 100 points
team a = 25 points
Etc.

Then enter a value such as 1000 and it will then randomly generate a list of team's that will add up to the total amount specified. (1000)

Regards,

Last edited by caramannaj; 10-13-2016 at 02:57 PM.
 
Old 10-14-2016, 07:37 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Hi,

Welcome to LQ.

Well you need to decide whether you wish to do this via script, program or both.

If you're running Linux and running one of the popular desktop distributions, then you likely have a compiler for C and C++ programs. Likely you have Python if you choose to try Python scripts. Likely also you have a shell, such as BASH to allow you to write BASH scripts.

You've defined a problem to solve. That's fine. Probably need some refinement on the limitations or input/output boundaries, but otherwise it seems a fine problem to tackle. And one which you can address using the languages or script capabilities I've discussed.

As far as BASH scripting, my signature contains some links, some of others and one of my blog about BASH scripting, and the one about debugging C programs while it's intentions are to illustrate how to debug a problem, also does show rudimentary compiling from the command line.

So I suggest a few things:
  1. Determine which language you wish to try out, or at least the path you wish to try, for instance 'try BASH first, then C', or 'try Python first, then BASH', etc
  2. Start writing something to address your defined problem, .... actually starting writing the very most basic script or program to get your feet wet, and then start at your problem
  3. Post your progress - Please note that at LQ we are happy to help however we like to see that you put in some effort, therefore people are not interested in solving this problem and 'giving' you a solution, but instead people will help you work towards that solution and refine it so that you can learn the things you say you are trying to learn.
Best of luck and looking forward to your updates!
 
Old 10-14-2016, 09:38 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
basically it is all the same. you need a data type that will store the values as they add up. Using an array would help you in this as well.
 
  


Reply


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
Require some help with creating a bash-shell script and a few other questions guiltycrown657 Linux - Newbie 2 12-01-2015 08:29 AM
Desktop, configuration and script guidance linuxbird Linux - Newbie 1 11-26-2011 06:21 AM
script guidance needed kais1 Linux - Newbie 4 12-12-2008 08:13 AM
Need guidance on creating minimal boot CD to load a few program and run a script angotia Linux - General 2 07-10-2008 03:59 AM
Need Guidance Oh Linux Gurus, Questions About Distro Choice and Window Managers, Etc. x_freeride_x Linux - Desktop 3 12-11-2006 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:47 PM.

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