Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11: Automating System Tasks > Understanding Shell Scripts

Understanding Shell Scripts

Have you ever had to repeatedly do a task that took a lot of typing on the command line? Do you ever think to yourself, “I wish there were just one command I could type to do all this of this”? Maybe a shell script is what you’re after.

Shell scripts are the equivalent of batch files in MS-DOS, and they can contain long lists of commands, complex flow control, arithmetic evaluations, user-defined variables, user-defined functions, and sophisticated condition testing. Shell scripts are capable of handling everything from simple one-line commands to something as complex as starting up your Fedora system.

In fact, as you will learn in this chapter, Fedora does just that. It uses shell scripts (/etc/rc.d/rc.sysinit and /etc/rc) to check and mount all your file systems, set up your consoles, configure your network, launch all your system services, and eventually provide you with your login screen. There are nearly a dozen different shells available in Fedora, but the default shell is called bash, the Bourne-Again Shell.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint