DispersedNet
SiteMap
Unix Concepts
Shell Programming
Shell Scripting
Unix Questions
Design Scripts
«Prev
Next»
Shell Programming
Shell Programming
Unix Shell Available
Determining Unix Shell
Shell Scripts Unix
Interpreted Compiled Programs
Understanding Scripting Options
Cmpiled Programs
Shell Components
Shell Script Macro
Built in Components
Input Output Tools
Shell Script Tests
Script Variables
shell-script-control-structures
Regex Define Patterns
Shell Program Components
Writing First Script
Interactive Shell Script
Defining Script File
Using Text Editor
Read Input Command
Including Comments Scripts
Setting File Permissions
Running Command Line
Working With Variables
Command Line Arguments
Using Positional Variables
Predefined System Variables
System Variables
Environment Variables
Syntax Affects Interpretation
Using Strings Variables
Using Numbers-inVariables
Performing Math Variables
Using Array Variables
Scripts Variable Summary
Designing Scripts
Script Objective
Script Flow
loop Tests
Checking Commands
error Trapping
Making Script Portable
Documenting Script
Designing Shell Scripts
Documenting Shell Script - Exercise
Explaining good shell scripting practices
Objective:
Explain terms and practices that lead to well-documented shell scripts.
Exercise scoring
This exercise is worth 7 points.
Instructions
Consider the block of comment that appears (or should appear) at the beginning of each shell script. This is internal documentation for a project.
How is self-documenting code different from this? Give an example of something in a script that would be self-documenting versus using something that is not.
How is online usage information different from these comments within a script? How do you view the online usage information for most UNIX commands?
What else can be done to help users know how to use a script?
Submitting your Exercise
Submit your answer into cyberspace in the text box below.