git://git.iain.cx/iain
/
profile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
328f2f4
)
Added ts script.
author
Iain Patterson
<me@iain.cx>
Tue, 14 Jul 2009 09:28:59 +0000
(10:28 +0100)
committer
Iain Patterson
<me@iain.cx>
Tue, 14 Jul 2009 09:46:16 +0000
(10:46 +0100)
Script to show files modified today. (t)oday l(s): ts.
opt/bin/ts
[new file with mode: 0755]
patch
|
blob
diff --git a/opt/bin/ts
b/opt/bin/ts
new file mode 100755
(executable)
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]"