Lines Matching +full:opt +full:- +full:in
6 # SPDX-License-Identifier: Apache-2.0
11 # outputs the date and time in pre-set formats
12 # default format is: 20150114-181112
13 # usage: timestamp [-a] [-d] [-u] [-s] [-S]
14 # where: -a changes default to: 2015-01-14-18-11-56
15 # -d changes default to: 20150114
16 # -u changes default to: 20150114_181201
17 # -s changes default to: 20150114-1812.04
18 # -S changes default to: 20150114-1812
19 # Some switches can be mixed and matched, eg. -Sa gives 2015-01-14-18-13
25 date_time_separator="-"
28 printf "usage: %s [-a] [-d] [-u] [-s] [-S]\n" $exe_name >&2
33 exit -1
37 declare -r optstr="adusSh"
38 while getopts ${optstr} opt; do
39 case ${opt} in
54 date_format="%Y-%m-%d"
55 time_format="%H-%M"
56 seconds_separator="-"