10.3.19 getSecond (gets second from time)
Syntax
getSecond [time]
Description
This command outputs the second of the time specified for argument with 2-digit character string (numeric characters). Range of numeric characters varies depending on OS due to difference of support for leap second. If this argument is omitted, the current time is assumed.
Arguments
- time
-
This command specifies the character string that indicates time.
You can specify a time by using an absolute time in the same syntax as when using the date command (examples: hh:mm:ss, hhmm).
Output to the standard output
2-digit character string that indicates seconds (numeric characters)
Return codes
Return code |
Meaning |
---|---|
0 |
Normal termination |
Not less than 1 |
Termination with an error |
Notes
Although the character string that can be specified for time is the same as that of the date format based on absolute date with the date command, whether the character string can be specified is not verified.
Examples
getSecond 15:20:01 # "01" is output.