aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2013-03-08 00:15:09 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2013-03-08 00:15:09 +0100
commitfced211a6f817c7950aeedeebec1fc955041ef40 (patch)
treeb636b954ec533e1f57aacd76bdecdb365c6f5bd4 /conf
parentconf/bashrc: add gitpush1 to push commits one by one (diff)
downloadlaurent-tools-fced211a6f817c7950aeedeebec1fc955041ef40.tar.xz
laurent-tools-fced211a6f817c7950aeedeebec1fc955041ef40.zip
conf/bashrc: add now(), prepends date to tailed new lines
usage: tail -F test.log |now tail -F test.log |now "[%d/%b/%Y %H:%M:%S %z]"
Diffstat (limited to 'conf')
-rw-r--r--conf/bashrc1
1 files changed, 1 insertions, 0 deletions
diff --git a/conf/bashrc b/conf/bashrc
index cf0a874..87f34d7 100644
--- a/conf/bashrc
+++ b/conf/bashrc
@@ -70,6 +70,7 @@ alias usee='vim ~/perso/USEFULL_COMMANDS'
alias xbindkeys-reload="pkill xbindkeys; xbindkeys"
alias tn='tmux new-session -s'
alias ta='tmux attach'
+function now() { while read line; do echo -ne "`date ${1:++"$1"}` $line\n"; done }
function htod() { echo "ibase=16; $1" | bc; }
function dtoh() { echo "obase=16; $1" | bc; }