aboutsummaryrefslogtreecommitdiff
path: root/stow/vim/.vim/ftplugin/sh/snippets/template.txt
blob: 64d3a2e5f8c2de479cbb8b5072cb1a24c11152cd (plain)
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/sh

# template.sh: A template for sh scripts
#
# Usage: template.sh [-ac] [-b OPTARG] FILE...

usageMessage="Usage: template.sh [-ac] [-b OPTARG] FILE..."

# Process options
while getopts ':ab:c' opt; do
	case $opt in

		'a' )
			echo a
			;;

		'b' )
			echo b $OPTARG
			;;

		'c' )
			echo c
			;;

		'?' )
			printf "${usageMessage}\n"
			exit 1

	esac
done
shift $(($OPTIND - 1))

<++>