diff options
author | epochqwert <epoch@hacking.allowed.org> | 2015-04-23 04:53:35 -0500 |
---|---|---|
committer | epochqwert <epoch@hacking.allowed.org> | 2015-04-23 04:53:35 -0500 |
commit | a36652959e52e8c810b7d2d76a283b2ae9718d96 (patch) | |
tree | a8c9712f7eb243d72bfdb492c0c14e630e78a03d /nocompile/bin/elapsedtime | |
parent | 318b3220d191011bb9132efd4dbd5e6fb467b4e7 (diff) | |
download | misc-a36652959e52e8c810b7d2d76a283b2ae9718d96.tar.gz misc-a36652959e52e8c810b7d2d76a283b2ae9718d96.zip |
elapsedtime handles partial seconds better
unescape now handles multiple lines from stdin
clump can now have an optional argument to specify input separator
cuturl can now take compressed short options. (like: cuturl -dPs)
filemon... I don't remember. just reformatted it looks like.
ipconvert. looks like I added explainations before output.
normalpath now uses getenv("PWD") instead of getcwd() so you can pick what you want to be the base for relative paths.
urcdump... nothing I guess. probably a space or something dumb.
httpd... more environment variables set for CGIs
Diffstat (limited to 'nocompile/bin/elapsedtime')
-rwxr-xr-x | nocompile/bin/elapsedtime | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/nocompile/bin/elapsedtime b/nocompile/bin/elapsedtime index 3d26597..ff7ea52 100755 --- a/nocompile/bin/elapsedtime +++ b/nocompile/bin/elapsedtime @@ -5,14 +5,21 @@ else read time fi -partials=$(echo $time | cut -d. -f2) +partials=$(echo $time | grep "\." | cut -d. -f2) wholes=$(echo $time | cut -d. -f1) seconds=$(( wholes % 60 )) minutes=$(( wholes/60 % 60 )) hours=$(( wholes/60/60 % 24 )) -days=$(( wholes/60/60/24 % 7 )) -weeks=$(( wholes/60/60/24/7 )) -echo $weeks weeks $days days $hours:$minutes:$seconds.$partials +days=$(( wholes/60/60/24 )) +#days=$(( wholes/60/60/24 % 7 )) +#weeks=$(( wholes/60/60/24/7 )) +#echo $weeks weeks $days days $hours:$minutes:$seconds.$partials +echo -n $days days $hours:$minutes:$seconds +if [ "_$partials" != "_" ];then + echo .$partials +else + echo +fi if read time;then elapsedtime $time fi |