Summary


In this lesson, we covered what you need to know to get started, and how Unix works with writing complex scripts. We also looked at a sample script and dissected it so that its contents made sense. Shell scripting is an advanced topic and was covered only briefly here, so please take the time if it interests you and expand your learning on it. There are many online tutorials and books available to help you learn your favorite shells' scripting capabilities. Here's a review of the key points of this lesson:

  • Your shell scripts can be stored in files to enable you to execute many commands by simply typing one. You already know how to make a file; now you are starting to learn what to populate it with.

  • There are many different shells and your shell might work differently than what is presented here, but probably has similar capabilities. You need to select and use a shell that serves your needs, and then learn the scripting functionality of that shell.

  • The foreach command enables you to repeat a set of commands for each of a number of files.

  • The while command enables you to repeat a set of commands while a certain condition holds.

  • The if command enables you to execute a command, or not execute it, based on a conditional statement.



    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net