#!/bin/csh -f #+ # pause -- suspend execution until user presses # # Purpose: # Stop program execution, print out a message, and wait until # the user presses the key before exiting # # Usage: # pause [prompt] # # Arguments: # prompt = message to be printed on the terminal # # Output: # Message is printed on stdout # # Restrictions: # Prompts containing characters with special meaning to the shell # (e.g., *()!&#) must be enclosed within double quotes ("). # # Example: # 1) To pause program execution, use: # pause # # 2) To pause and print a message, use: # pause Tell the OA to stop guiding, then press RETURN # #- # Modification history: # Date unknown ??? Original version # 2000-Jul-04 GDW Added description #----------------------------------------------------------------------- # define default... set text = "Press the key to continue..." # accept user's alternative if offered... if ($#argv > 0) set text = "$* >>" printf "\n$text" set junk = ($<)