From 30300843e0c66ca3eefa97f5787f95b07c256d2f Mon Sep 17 00:00:00 2001 From: Epoch Qwert Date: Sun, 23 Nov 2014 14:25:42 -0600 Subject: fixed gitignore. >_> added a bunch of new piddly shit. --- nocompile/bin/elapsedtime | 18 ++++++++++++++++++ nocompile/bin/unescape | 7 +++++++ nocompile/bin/what | 9 +++++++++ 3 files changed, 34 insertions(+) create mode 100755 nocompile/bin/elapsedtime create mode 100755 nocompile/bin/unescape create mode 100755 nocompile/bin/what (limited to 'nocompile/bin') diff --git a/nocompile/bin/elapsedtime b/nocompile/bin/elapsedtime new file mode 100755 index 0000000..3d26597 --- /dev/null +++ b/nocompile/bin/elapsedtime @@ -0,0 +1,18 @@ +#!/bin/sh +if [ "_$1" != "_" ];then + time=$1 +else + read time +fi + +partials=$(echo $time | 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 +if read time;then + elapsedtime $time +fi diff --git a/nocompile/bin/unescape b/nocompile/bin/unescape new file mode 100755 index 0000000..c3cac84 --- /dev/null +++ b/nocompile/bin/unescape @@ -0,0 +1,7 @@ +#!/bin/sh +if [ "_$1" != "_" ];then + l="$1" +else + read l +fi +printf "$(echo "$l" | sed "s/%/\\\\x/g")" diff --git a/nocompile/bin/what b/nocompile/bin/what new file mode 100755 index 0000000..154dcc7 --- /dev/null +++ b/nocompile/bin/what @@ -0,0 +1,9 @@ +#!/bin/bash +cd /usr/local/share/answers/what +cd $1 +while shift 2>/dev/null;do + if [ "$1" ];then + echo $1 | sed "s/[^a-zA-Z0-9]//g" | xargs echo + fi +done +cat _ -- cgit v1.2.3