summaryrefslogtreecommitdiff
path: root/dot/bashrc
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2017-07-08 08:48:06 -0400
committerAndrew Cady <d@jerkface.net>2017-07-08 08:48:06 -0400
commit036a906d8954a45f2fa26356f105bee452011614 (patch)
tree55869eeef7b9179a4be9eb1ed2afa24252a965bd /dot/bashrc
parent33d8e0faee1f394c1bdf46c1188c9cff3d87bae2 (diff)
bashrc: new functions take() and torrent()
Diffstat (limited to 'dot/bashrc')
-rw-r--r--dot/bashrc22
1 files changed, 21 insertions, 1 deletions
diff --git a/dot/bashrc b/dot/bashrc
index 6a5c336..66df697 100644
--- a/dot/bashrc
+++ b/dot/bashrc
@@ -283,6 +283,26 @@ esac
283pingwait() 283pingwait()
284{ 284{
285 while ! ping -c1 "$@"; do 285 while ! ping -c1 "$@"; do
286 sleep 1; 286 sleep 1
287 done 287 done
288} 288}
289
290take ()
291{
292 local n="$1" r=
293 while [ "$n" -gt 0 ]; do
294 read line && r="$r $line"
295 let --n
296 done
297 if [ "$r" ]; then
298 r=${r# }
299 echo "$r"
300 else
301 false
302 fi
303}
304
305torrent ()
306{
307 rsync -P "$@" borges:/srv/4T-temp/transmission/torrents/
308}