From: Iain Patterson Date: Tue, 14 Jul 2009 09:28:59 +0000 (+0100) Subject: Added ts script. X-Git-Url: http://git.iain.cx/?p=profile.git;a=commitdiff_plain;h=b0b8dbabff8ce01aa5c7b878d550397c73ae7d2a;hp=328f2f42404cb5de71e06be1e44ddc1957a89800 Added ts script. Script to show files modified today. (t)oday l(s): ts. --- diff --git a/opt/bin/ts b/opt/bin/ts new file mode 100755 index 0000000..3da2888 --- /dev/null +++ b/opt/bin/ts @@ -0,0 +1,10 @@ +#!/bin/bash + +options="-l" +if echo "$LS_OPTIONS" | /bin/grep -- "--time-style=long-iso" &>/dev/null; then + today=$(/bin/date +'%Y-%m-%d') + options="$options --time-style=long-iso" +else + today=$(/bin/date +'%b %e') +fi +/bin/ls $options ${1+"$@"} | /bin/grep "$today [012][0-9]:[0-9][0-9]"