-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomment
More file actions
executable file
·33 lines (33 loc) · 966 Bytes
/
Copy pathcomment
File metadata and controls
executable file
·33 lines (33 loc) · 966 Bytes
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
28
29
30
31
32
33
#!/bin/zsh
# vim: ts=8 sw=8
###########################################################################
# COPYRIGHT NOTICE
#
# Copyright (C) 1997 VME Microsystems International Corporation
# International copyright secured. All rights reserved.
###########################################################################
# @(#)comment.sh 1.2 97/09/22 VMIC
###########################################################################
# Format comments the way I like them
###########################################################################
me=$(basename $0)
USAGE="usage: $me [-c #] [-n #] [file...]"
# ccol=39
# LLEN=68
ccol=41
LLEN=75
while getopts :c:n: c
do
case "$c" in
c) ccol="$OPTARG";;
n) LLEN="$OPTARG";;
*)
echo "${me}: unknown switch (-${OPTARG})" >&2
echo "$USAGE" >&2
exit 1
;;
esac
done
shift $(expr $OPTIND - 1)
expand $* |
${DEBUG} awk -f ${0:h}/comment.awk -v ccol="${ccol}" -v LLEN="${LLEN}"