1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/bin/bash
# USAGE
# mkdesc <sc> <ll> <filenames>
#
# FUNCTION
# The files are assumed to be text files beginning with the standard SAC
# function specification header. The function name and the description of
# each file are extracted and formatted as follows:
# COLUMN 1 sc ll
# <name> <text......................................>
# <0 or more lines of additional text........>
#
# If the function name consists of more than 'sc-2' characters the text in
# the first line will begin to the right of column 'sc'.
if [ $# -lt 1 ]
then
echo "USAGE:"
echo " mkdesc <sc> <ll> <filenames>"
else
args=("$@")
for fname in "${args[@]:2}"
do
awk -f $saclib/bin/mkdesc.awk sc=$1 ll=$2 $fname
done
fi
|