File: mkdescd

package info (click to toggle)
saclib 2.2.8-6.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,872 kB
  • sloc: ansic: 40,932; csh: 1,190; asm: 541; awk: 320; sh: 246; perl: 116; makefile: 98; sed: 48
file content (27 lines) | stat: -rwxr-xr-x 811 bytes parent folder | download | duplicates (5)
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