Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home

Shells: User's Guide: HP 9000 Computers

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

HP Part Number: B2355-90046

Edition: Second Edition

Published: August 1992


Table of Contents

Printing History
I Introduction
1 Introduction to Shells
What are Shells?
What is Bourne Shell?
What is C Shell?
What is Korn Shell?
What is POSIX Shell?
What is Key Shell?
Choosing Between the Shells
Changing Shells
Determining Your Login Shell
Temporarily Changing Your Shell
Permanently Changing Your Shell
II Bourne Shell
2 The Bourne Shell
Introduction
UNIX System Structure
Definitions
Conventions
3 Shell Command
Introduction
Sequential Processing
Nonsequential (Background) Processing
Redirecting Input and Output
Pipes
Redirection in Pipes
Pipe Example
File Name Generation
4 Shell Scripts
Introduction to Shell Scripts
Simple Scripts
Scripts With More Than One Line
Echo and Redirection in Scripts
The .profile File
Customizing .profile
5 Basic Shell Programming
Introduction
Parameters
Using Parameters in Shell Programs
Parameter Substitution
Positional Parameters
Shift
Echo
Quoting
Command Substitution
Conditions: The if Statement
Test
Read
Exit
Comments
Example: Moving Files
6 Advanced Programming
Introduction
Looping
For
While
Until
Case
Other Commands
The . (dot) Command
The eval Command
Using Shell Expansions
Helpful Tips
Example: Groupcopy
Discussion of Example: Groupcopy
7 Programming Tips
Introduction
Debugging
Creating Optional Pieces in a Pipe
Halting Background Processes
8 Detailed Reference
Introduction
Command Separators
The && Separator
The || Separator
Mixing Separators
Command Grouping
Defining Functions
Input/Output
Special Commands
Return Values
Parameters Set by the Shell
Options for the sh Command
9 Bourne Glossary
Glossary Entries
III C Shell
10 Preparing to Use the Shell
Introduction
HP-UX Standard Shells
Shell Startup and Termination
Running C Shell From the Bourne Shell
Making C Shell Your Login Shell
Terminating C Shell
C Shell Startup
Setting Environment and Shell Variables
The .cshrc Shell Script File
The .login Shell Script File
C Shell Termination
11 Command History
The Command History Buffer
Re-executing Events
Referencing by Event Number
Referencing by Relative Location
Referencing by Event Text
Reusing Command Arguments
Modifying Previous Events
An Example
12 Aliases, Command Substitution, Metacharacters
Aliases
Aliasing Existing Commands
Creating Custom Commands
Alias Substitution
Alias Use Restrictions
Unaliasing an Alias
Command Substitution
Metacharacters in C Shell
Syntactic Metacharacters
File Name Metacharacters
Quotation Metacharacters
Input/Output Metacharacters
Expansion/Substitution Metacharacters
Other Metacharacters
Using Metacharacters as Normal Characters
13 Shell Variables
Built-In Shell Variables
argv
autologout
cwd
home
Boolean ignoreeof
cdpath
Boolean noclobber
Boolean notify
path
prompt
shell
status
Numeric Shell Variables
Numeric Expressions
File Evaluation
An Example
14 Commands, Jobs, and Scripts
csh Commands
The alias Command
The echo Command
The history Command
The logout Command
The rehash Command
The repeat Command
The set Command
The setenv Command
The source Command
The time Command
The unalias Command
The unset Command
The unsetenv Command
Jobs
C Shell Scripts
When Not to Use a Script
Running a Script
Script Execution
Shell Script Expressions
Shell Script Control Structures
Supplying Input to Commands
Catching Interrupts
An Example Shell Script
IV POSIX and Korn Shell
15 Introducing the Shells
Introduction
What is a Shell?
POSIX and Korn Shell Versus Other Shells
Features From C Shell
Differences from Bourne Shell
Differences between POSIX Shell and Korn Shell
Definition of Terms
Conventions
Supplementary Information Resources
16 Starting and Stopping the Shell
Introduction
Getting Started
Login
Command Line
Invoking the Shell
Running POSIX or Korn Shell from the Current Shell
Specifying Your Login Shell
Setting Environment and Shell Variables
Setting Up .profile and .kshrc
Setting up .profile
Setting up ENV
The set Command
Terminating the Shell
Using exit
Executing a .logout Script
17 Shell Grammar
Introduction
Using Pipes
Two-Way Pipes
Command Separators and Terminators
Name Completion
File Name Completion
Path Name Completion
File Name Substitution
Quoting
Input and Output
Other Metacharacters
18 Aliasing: Abbreviating Commands
Introduction
Setting an Alias
Tracking Aliases (for Korn Shell only)
Exporting Aliases (for Korn Shell only)
Default Aliases
Special Aliasing Features
Unsetting an Alias
19 Substitution Capabilities
Introduction
Tilde Substitution
Parameter Substitution
Setting and Using Keyword/Named Parameters
Setting and Using Positional Parameters
Parameter Substitution Conventions
Special Parameters
Command Substitution
20 Command Lines and Command History
Editing Command Lines
Using Inline Editing Modes
Using vi Line Edit Mode
Using emacs and gmacs Line Edit Mode
Accessing the History File
Using the fc Command
21 Basic Shell Programming
Introduction
Creating and Executing Shell Scripts
Commenting
Data Input and Output
Reading Input Data
Printing Data
Conditional Statements
Using the test Command
Using the if Statement
Using the case Statement
Using the select Statement
Using the for Loop
Using the while/until Loops
Using the break Statement
Using the continue Statement
Arithmetic Evaluation Using let
Accessing Arrays
Writing Functions
Calling Functions
Returning from a Function
22 Controlling Jobs
Introduction
Creating Jobs
Monitoring Jobs
Suspending Jobs
Putting Jobs in Background/Foreground
Killing Jobs
23 Advanced Concepts and Commands
Introduction
The ENV Variable
Coprocesses
The whence Command
The set Command
The typeset Command (for Korn Shell only)
The trap Command
The ulimit Command (for Korn Shell only)
24 Command Reference
Introduction
alias
Syntax
Example
bg
Syntax
Example
break
Syntax
Example
case
Syntax
Example
cd
Syntax
Example
continue
Syntax
Example
echo
Syntax
Example
eval
Syntax
Example
exec
Syntax
Example
exit
Syntax
Example
export
Syntax
Example
fc
Syntax
Example
fg
Syntax
Example
for
Syntax
Example
function
Syntax
Example
if
Syntax
Example
jobs
Syntax
Example
kill
Syntax
Example
let
Syntax
Example
print
Syntax
Example
pwd
Syntax
Example
read
Syntax
Example
readonly
Syntax
Example
return
Syntax
Example
select
Syntax
Example
set
Syntax
Example
shift
Syntax
Example
test
Syntax
Example
time
Syntax
Example
times
Syntax
Example
trap
Syntax
Example
typeset
Syntax
Example
ulimit
Syntax
Example
umask
Syntax
Example
unalias
Syntax
Example
unset
Syntax
Example
wait
Syntax
Example
whence
Syntax
Example
while/until
Syntax
Example
V Key Shell: Korn Shell Softkey Interface
25 Introducing the Key Shell
Introduction
Introduction to Key Shell
Who Should Use Key Shell
Conventions
26 Getting Started With Key Shell
Introduction
Starting Key Shell
The Default Key Shell Environment
Key Shell Initialization
Using Key Shell
Guidelines for Using Key Shell
Using Online Help
Entering Commands
Editing the Command Line
Configuring Key Shell
Adding, Moving, and Deleting Softkeys
Changing Global Options
Changing the Status Line
Saving Configuration Changes
Restarting Key Shell
Undoing Configuration Changes
Setting Shell Variables
Using Key Shell with Terminal Session Manager
27 Customizing the Key Shell
Introduction
Understanding Key Shell
How Key Shell Stores Softkey Information
How Key Shell Defines Softkeys
How Key Shell Translates a Softkey Command
Adding Text to Softkeys
Adding Required and Hint Text
Adding Help Text
Creating Custom Softkeys
Backup Softkeys
Examples
Index
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-1991 Hewlett-Packard Development Company, L.P.