LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-04-2014, 06:01 AM   #1
jazzo
Member
 
Registered: Jul 2012
Posts: 192

Rep: Reputation: Disabled
learning the shell and shell scripting


HI all, I have been using linux for a number of year, but never to its full potential as I have relied upon the GUI. I feel that it is probably time to have a better look at it and learn the shell and the shell scripting. Now, I had a look around the net for a good tutorial for beginners, found an awful lot, but nothing really that explains everything and I was wondering whether you guys have anything to suggest. I got hold of "Linux all in one for dummies", which is quite a comprehensive book, but maybe too much and there isn't that much emphasis on the shell and shell scripting as I would like. I was wondering, what would you guys suggest?
 
Old 10-04-2014, 07:42 AM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,650

Rep: Reputation: 568Reputation: 568Reputation: 568Reputation: 568Reputation: 568Reputation: 568
Learning

Learning is not like that. If you try to learn everything about the subject in one go, you are more likley to fail and in a way that will discourage you.
Use any of the online primmers or guides for beginners, and make some scripts that are useful and not terribly difficult. Then, when that is easy, figure out ways to make them better, more capable, or perform the smae job in less or faster code. Learn "advanced tricks" as you need them and research and read the more advanced guides with enough experience to make sense of the new ideas.

We will still be here to help, and questions are good.
 
Old 10-04-2014, 08:15 AM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,159
Blog Entries: 10

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
http://www.linuxquestions.org/questi...llected-35954/

has a 'few'

Also, http://www.linuxquestions.org/questi...eniuses-35795/

Last edited by Habitual; 10-04-2014 at 08:18 AM.
 
Old 10-04-2014, 09:23 AM   #4
jazzo
Member
 
Registered: Jul 2012
Posts: 192

Original Poster
Rep: Reputation: Disabled
thanks guys, I had a quick look at those links, definitely useful there is an awful lot there! I must admit I forgot to mention something important: generally speaking I'm sure that the logic of the scripts is easy enough but my biggest problem is not knowing enough about linux commands: I mean I use a few "programs" (I think this is what they call them) like ls, chmod, and various other but I think - and please correct me if I am talking rubbish - that learning shell script without knowing that much about what you can accomplish with the terminal isn't gonna work. While I totally agree with wpeckham, don't you guys think that it would be sensible to learn first a few more things with bash in terms of administrative tasks and that kind of stuff before I delve into bash scripting? That's why I suggested that linux book for dummies as one of the possible tutorials. What do you reckon?
 
Old 10-04-2014, 11:07 AM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,244

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684
http://tldp.org/LDP/abs/html/
http://mywiki.wooledge.org/TitleIndex

Those are my 2 suggestions and read in that order. As for commands, I really believe that the standard man page for each is more than enough to help.
 
Old 10-04-2014, 04:24 PM   #6
jazzo
Member
 
Registered: Jul 2012
Posts: 192

Original Poster
Rep: Reputation: Disabled
well, thank you very much, no doubt I will be asking questions as I learn!
thanks
 
Old 10-04-2014, 05:26 PM   #7
jazzo
Member
 
Registered: Jul 2012
Posts: 192

Original Poster
Rep: Reputation: Disabled
ah @grail, do you happen to know if the Advanced Bash-scripting guide is available as a pdf by any chance, so I could bring it with me on my phone and read it where i got no connection?

Ah, it looks like I've found after all :-) and it's definitely a legal copy as there is no copyright, yay!

Last edited by jazzo; 10-04-2014 at 05:29 PM.
 
Old 10-04-2014, 06:37 PM   #8
AnonymousGuy
LQ Newbie
 
Registered: Sep 2014
Posts: 16

Rep: Reputation: Disabled
@ jazzo

Don't try to learn all in one shot. It is a process that takes time and understanding. I've been writing shell scripts for many years and believe or not, I am still learning because bash gets new features and functions as well as CLI programs with newer options.

Start with the basic commands and create simple scripts. Learn and understand how to use variables and use them in your scripts.

The more you focus on doing things from the CLI and rely less on the GUI, the better your knowledge of commands and using them in scripts will improve. Next, gradually expand your knowledge and practice, practice, practice.


Visit this website http://www.commandlinefu.com/commands/browse and look at some codes. Some will be simple and others will be like WTF is this.

I get ideas from this site because some of the codes will be better than mine and it's a good way to learn more stuff.

Last edited by AnonymousGuy; 10-05-2014 at 01:55 PM.
 
Old 10-04-2014, 07:22 PM   #9
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,159
Blog Entries: 10

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Quote:
Originally Posted by jazzo View Post
ah @grail, do you happen to know if the Advanced Bash-scripting guide is available as a pdf by any chance, so I could bring it with me on my phone and read it where i got no connection?

Ah, it looks like I've found after all :-) and it's definitely a legal copy as there is no copyright, yay!
Check out http://tldp.org/LDP/abs/abs-guide.pdf
 
Old 10-04-2014, 08:26 PM   #10
AnonymousGuy
LQ Newbie
 
Registered: Sep 2014
Posts: 16

Rep: Reputation: Disabled
Quote:
Originally Posted by jazzo View Post
ah @grail, do you happen to know if the Advanced Bash-scripting guide is available as a pdf by any chance, so I could bring it with me on my phone and read it where i got no connection?

Ah, it looks like I've found after all :-) and it's definitely a legal copy as there is no copyright, yay!
Reading pdf's on phones is not that great because it fills the entire pdf document on the screen. You would need to zoom and scroll up, down, left and right to read it.

Your best option is to convert the pdf file to an epub or a kindle compatible format.

The tool is called calibre and it's a cross platform tool for most OSes including linux. Check your distro's repos.

Note: Simple pdf's will usually convert well, but more complex pdf's will lose it's formatting like incomplete/misspelled words and stray artifacts in pages.

All you can do is try and see the results.

Good luck

Last edited by AnonymousGuy; 10-05-2014 at 01:57 PM.
 
Old 10-05-2014, 09:09 AM   #11
jazzo
Member
 
Registered: Jul 2012
Posts: 192

Original Poster
Rep: Reputation: Disabled
thanks for all the great feedback and advices guys, much appreciated :-)!
 
  


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
win32,shell code,shell programming,shell scripting? mr.cracker Linux - Newbie 4 07-13-2013 12:20 AM
need help in learning shell scripting usmansamad Linux - Newbie 4 07-30-2009 05:01 AM
LXer: Terminal functions for shell scripting with Shell Curses LXer Syndicated Linux News 0 03-27-2008 12:50 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 03:14 AM
shell interface vs shell scripting? I'm confused jcchenz Linux - Software 1 10-26-2005 04:32 PM


All times are GMT -5. The time now is 01:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration