show_help

Display a help message about a bash script (if it exists). To make this work, the system variable SCOHELPS must be set (probably in you .bashrc or .cshrc):

 

% echo $SCOHELPS
/home/sco/sco/codes/bash/HELP_FILES

Part of my .cshrc file: 
# define path to script help files
setenv SCOHELPS $codes/bash/HELP_FILES

To use this from the command line:
 

% show_help 
Usage: show_help ds9_view_markII 
arg1 - name of script you want help for

 % show_help ds9_view_markII 
Help Information for:  ds9_view_markII

Usage: ds9_view_markII a.fits 1.0 2000.0 1 A
arg1 - names of fits image to be viewed
arg2 - low display level (z1)
arg3 - high display level (z2)
arg4 - frame number to be used 
arg5 - region display (Q=query, A=always_display, N=never_display) 
z1,z2= (minmax n) or (zscale n) will work

I will show: /home/sco/sco/codes/bash/HELP_FILES/ds9_view_markII.help

Enter any key to roceed with the view of help:

Finally, here is how I like to use this from within a script:
 


if [ {$1="--help"} || {$1="-h"} ]
then
 show_help ds9_view_markII
 exit
fi





Back to SCO CODES page