Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2. Bourne Shell (sh) Use sh instead of bash (Bourne Again Shell), to make your scripts more portable. sh – csh – tcsh - bash.

Similar presentations


Presentation on theme: "Chapter 2. Bourne Shell (sh) Use sh instead of bash (Bourne Again Shell), to make your scripts more portable. sh – csh – tcsh - bash."— Presentation transcript:

1 Chapter 2

2 Bourne Shell (sh) Use sh instead of bash (Bourne Again Shell), to make your scripts more portable. sh – csh – tcsh - bash

3 Unix Files dd if = /dev/cdrom | \ ssh remotehost ‘dd of=s.iso’ who | ssh ns4 'cat >| Waste/a.out‘ The vast majority of automation operations are based on copying and/or modifying files. When files change or new files are distributed, a process on the host needs to restart so the host can recognize the change. What we’ll be doing in this book is copying files, modifying files, and taking actions based on the success or failure of earlier file operations.

4 Understanding the Procedure Before Automating It Automation is simply a set of already working steps, tied together in an automated manner. Every step in the script must ensure succeed. Don’t move on blindly. –Even something as simple as copying a few config files into a new user’s home directory can fail when a disk fills up. KISS (Keep It Simple, Stupid)

5 Shell Commands in the useradd Example Backquote ` ` Shell Function Definition exit code test EXPRESSION && || Here Documents

6 Revision Control System man rcsintro


Download ppt "Chapter 2. Bourne Shell (sh) Use sh instead of bash (Bourne Again Shell), to make your scripts more portable. sh – csh – tcsh - bash."

Similar presentations


Ads by Google