diff options
author | Laurent Ghigonis <laurent@p1sec.com> | 2013-04-09 12:25:58 +0200 |
---|---|---|
committer | Laurent Ghigonis <laurent@p1sec.com> | 2013-04-09 12:25:58 +0200 |
commit | 0d2d18ecfe6b217ae37f81b1f30e3392ba0a7fcb (patch) | |
tree | c582baadd893e5fe08eece8ab93ac31d59296969 | |
parent | wireshark_dechunk: add date (diff) | |
download | laurent-tools-0d2d18ecfe6b217ae37f81b1f30e3392ba0a7fcb.tar.xz laurent-tools-0d2d18ecfe6b217ae37f81b1f30e3392ba0a7fcb.zip |
bashrc: add loop helpers
-rw-r--r-- | conf/bashrc-laurent-public | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/conf/bashrc-laurent-public b/conf/bashrc-laurent-public index 1196490..de8d30a 100644 --- a/conf/bashrc-laurent-public +++ b/conf/bashrc-laurent-public @@ -72,6 +72,8 @@ alias xbindkeys-reload="pkill xbindkeys; xbindkeys" alias tn='tmux new-session -s' alias ta='tmux attach' function now() { while read line; do echo -e "`date ${1:++"$1"}` $line"; done } +function loop() { time=$1; shift; while :; do echo $@; eval $@; sleep $time; done } +function loop_false() { time=$1; shift; while :; do echo $@; eval $@ && break; sleep $time; done } alias pingg='ping google.com' alias pingx='ping 8.8.8.8' |