Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tj/ms.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

ms.sh

A tiny bash script to convert milliseconds to strings, and strings to milliseconds.

Usage

. ms.sh

ms <string>
ms_to_s <ms>

String to milliseconds

ms 1000
ms 1s
ms 1m
ms 1h
ms 1d
ms 1y
ms 10s
ms 5d
1000
1000
60000
3600000
86400000
31557600000
10000
432000000

Milliseconds to string

ms_to_s $(ms 500)
ms_to_s $(ms 1s)
ms_to_s $(ms 15s)
ms_to_s $(ms 25m)
ms_to_s $(ms 60m)
ms_to_s $(ms 1h)
ms_to_s $(ms 2h)
ms_to_s $(ms 1d)
ms_to_s $(ms 5d)
ms_to_s $(ms 1y)
ms_to_s $(ms 5y)
500 milliseconds
1 seconds
15 seconds
25 minutes
1 hours
1 hours
2 hours
1 days
5 days
1 years
5 years

About

Bash string -> milliseconds & milliseconds -> string script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages