Yes, you can do that, and it would be a good workaround *if* $EPOCHREALTIME didn't already have 6 digits after the decimal point, including any trailing zeros.
The point is that you don't have to, and I'm suggesting that the documentation should make that clear so users can rely on it. ${EPOCHREALTIME: -6} On Tue, Jan 8, 2019 at 2:13 AM Andreas Schwab <sch...@suse.de> wrote: > > On Jan 07 2019, Keith Thompson <keithsthomp...@gmail.com> wrote: > > > I suggest documenting this behavior. It would be nice to be able to > > depend on the exact format, for example that ${EPOCHREALTIME/*./} > > is always exactly 6 digits long. > > ms=${EPOCHREALTIME/*./}000000 > ms=${ms:0:6} > > Andreas. > > -- > Andreas Schwab, SUSE Labs, sch...@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different."