LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Realistic Goals for newbie (https://www.linuxquestions.org/questions/linux-newbie-8/realistic-goals-for-newbie-4175417882/)

spaghettios 07-20-2012 09:46 PM

Realistic Goals for newbie
 
Hi, I am a total newbie. I have about 20hrs spread over 2 weeks which i'm going to throw at trying to learn bash scripting, which someone helped me use on a previous project (they wrote it, i hit enter). I have no idea about the language's power or capabilities, could someone give me ideas for projects which should be achievable by the end of this, so that i can put my understanding to the test. I don't think following someone else's tutorial would be an equally legitimate test. Assume no prior programming experience.

bigrigdriver 07-20-2012 10:21 PM

Start by reading these two bash scripting guides:
Bash beginners guide
Advanced bash scripting guide

Then set yourself a task. Take something that you do repeatedly, which has more that one step, but is a bit tedious. A script will relieve you of that tedium by allowing you to complete the task with one step: running the script.

Example:
You have you your home directory a number of caches: browser cache, thumbnails, etc. which will continue to accumulate files until you clean them out. A simple script to cd from directory to directory to rm the files will save you some time.

Then increase the complexity. Add a function to check the directory to see if it's empty before running the rm command. If empty, bypass the command, otherwise run rm to remove the files.

Scripts save time when doing *housekeeping* chores, but can do much more. Just look at the scripts in /etc/init.d.

MisterBark 07-20-2012 10:22 PM

From my experience, you learn better when you focus on the goal, not on the learning...

The question is: what are the first things you want to achieve with your Linux?

spaghettios 07-22-2012 05:16 AM

Thanks for those links, the material looks very digestible for my time horizon.

I agree, i would usually focus on the task rather than the process of learning, but in this instance i just didn't have an idea of what i could do with it.

chrism01 07-22-2012 08:14 PM

Those 2 links in post#2 definitely show you just about everything in pure bash, with examples :)
This is also a very good cli tutorial; a bit more task oriented http://rute.2038bug.com/index.html.gz

Here's a good link to some of the power tools like awk, sed & find, which you will see mentioned a fair bit http://www.grymoire.com/Unix/

Good Luck & Welcome to LQ :)


All times are GMT -5. The time now is 07:31 AM.