Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Do I need linux command line knowledge before learning bash scripting

  1. #1
    Join Date
    Nov 2005
    Beans
    822
    Distro
    Ubuntu 13.04 Raring Ringtail

    Do I need linux command line knowledge before learning bash scripting

    Is bash script commands the same as learning the linux command line terminal except you store the script or commands in a text file ?

    I mean to ask:
    Do I need command line knowledge before I start learning bash scripting ?

    Please advise
    Last edited by AgentZ86; June 14th, 2013 at 03:17 PM.

  2. #2
    Join Date
    Jun 2007
    Location
    Minneapolis, MN
    Beans
    749
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Do I need linux command line knowledge before learning bash scripting

    I kind of learned them both at he same time.
    There are commands you will only use in a script, and many that you will use stand alone.

    Here are two links that will help:

    Linux Commands: http://www.ss64.com/bash/

    Linux Shell Scripting Tutorial: http://freeos.com/guides/lsst/
    Moderation in all things; including moderation.

  3. #3
    Join Date
    Nov 2007
    Location
    Wisconsin
    Beans
    1,139

    Re: Do I need linux command line knowledge before learning bash scripting

    Quote Originally Posted by AgentZ86 View Post
    Is bash script commands the same as learning the linux command line terminal except you store the script or commands in a text file ?
    ...
    Do I need command line knowledge before I start learning bash scripting ?
    Yes, that describes shell scripting fairly accurately. There are caveats and exceptions, but that's a good 85% solution.
    No. While a prior understanding of many commands will speed your learning, many have learned both at the same time. JRV's links are quite good.

  4. #4
    Join Date
    Nov 2005
    Beans
    822
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Do I need linux command line knowledge before learning bash scripting

    thanks thats sort of what I was thinking too

  5. #5
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: Do I need linux command line knowledge before learning bash scripting

    bash scripting helps you learn how yo use commands that you otherwise wouldn't, so i'd recommended it as a method to better learn commands

  6. #6
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Do I need linux command line knowledge before learning bash scripting

    Hi

    Learning bash goes hand in hand with learning terminal commands as it's the terminal commands you generally want to script.

    There are only two sites i really recommend to learn bash scripting, bashisms and bash gotchas in particular.

    http://mywiki.wooledge.org/BashGuide

    http://wiki.bash-hackers.org/start

    Don't get me wrong, there are many other good sites out there as well, but reading both of these sites will give you an excellent grounding in bash scripting.

    After that, learn the differences between other bourne family shells such as dash, ash, zsh, korn etc.

    Later, sign up for the weekly news letter from sites such as unix.stackexchange.com when you know a bit more as there you will here information from some seasoned bash/linux/unix/solaris users.

    EDIT:

    BTW learn to use some of the tools that bash scripting will not be able to help you with.

    Learn sed and awk to start with, and an understanding of regular expressions are a must.

    These are two good sites but they may be a bit heavy going at first so look for some other sites and when you understand them, read these two.

    http://www.grymoire.com/Unix/Regular.html

    http://www.grymoire.com/Unix/sed.html

    Kind regards
    Last edited by matt_symes; June 14th, 2013 at 08:50 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  7. #7
    Join Date
    Aug 2007
    Beans
    27

    Re: Do I need linux command line knowledge before learning bash scripting

    A simple beginners guide that takes you through much of what you will need: http://steve-parker.org/sh/sh.shtml

  8. #8
    Join Date
    Jan 2010
    Location
    Hyperborea
    Beans
    2,045
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Do I need linux command line knowledge before learning bash scripting

    It's like needing to learn the meaning of words before you can construct a sentence.
    I'm happy to use the command line because I started with MSDOS and batch files, but Linux is much more powerful.
    The good news is that there is lots of good information on the internet. I'm sure that you will succeed.

  9. #9
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Do I need linux command line knowledge before learning bash scripting

    Quote Originally Posted by matt_symes View Post
    BTW learn to use some of the tools that bash scripting will not be able to help you with.

    Learn sed and awk to start with, and an understanding of regular expressions are a must.

    These are two good sites but they may be a bit heavy going at first so look for some other sites and when you understand them, read these two.

    http://www.grymoire.com/Unix/Regular.html

    http://www.grymoire.com/Unix/sed.html
    +1

    If you can get your hands on a copy of the O'Reilly book sed & awk, 2nd Edition then I highly recommend it (for learning regex as well as sed and awk). I first came across it in my local library and after having it on loan for a couple of months I bought my own copy when I had to return it. It's always at hand on my desk and I often refer to it when creating regular expressions.
    Cheesemill

  10. #10
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Do I need linux command line knowledge before learning bash scripting

    Hi

    Quote Originally Posted by jbo5112 View Post
    A simple beginners guide that takes you through much of what you will need: http://steve-parker.org/sh/sh.shtml
    This is kind of my point.

    Please don't get me wrong, as steve parkers site is great and i have read it myself, however from the site...

    A Bourne Shell Programming/Scripting Tutorial for learning about using the Unix shell.
    Personally i think, if you want to learn bash then learn bash and bashisms.

    This would be my second step. Learn the bourne/korn family shells.

    I am in no way disparaging your post. If i was teaching, I would just teach it in step 2.

    Kind regards
    Last edited by matt_symes; June 14th, 2013 at 09:06 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •