Chapter 10. Introduction to Shell Programming
Chapter Syllabus
10.1 Anatomy of a Shell Program
10.2 Using Variables
10.3 Command Line Arguments
10.4 Interactive Shell Programs
10.5 Exit Codes
10.6 The test Command
10.7 Branching
Shell programs or shell scripts are files containing HP-UX commands, comments, and control structures. These are like batch processes where commands are interpreted and executed by the shell line-by-line. Any command that can be executed at the shell prompt can be included in a shell program. Comments begin with a pound character (#
) and are not executed by the shell. The POSIX shell allows use of control structures that can be utilized for branching and looping within the shell program. These control structures use test conditions ...
Get HP-Certified HP-UX System Administration now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.