comparison .bashrc @ 330:0da3813d76d0

add buffer function
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 17 Jun 2013 01:24:45 -0700
parents eb9d0776226f
children 133eb1ade1dd
comparison
equal deleted inserted replaced
329:aae9b0776e60 330:0da3813d76d0
280 mv "$1" "$NEWNAME" 280 mv "$1" "$NEWNAME"
281 mv "$2" "$1" 281 mv "$2" "$1"
282 mv "$NEWNAME" "$2" 282 mv "$NEWNAME" "$2"
283 } 283 }
284 284
285 buffer() {
286 # temporary buffer with cat and /dev/null
287 cat > /dev/null
288 }
289
285 ### `which` commands 290 ### `which` commands
286 291
287 realwhich() { 292 realwhich() {
288 # which -> real paths 293 # which -> real paths
289 command which $@ | while read line 294 command which $@ | while read line
419 ### functions for web content 424 ### functions for web content
420 425
421 blog-file() { 426 blog-file() {
422 echo "$HOME/web/blog/k0s/entries/public/$1" 427 echo "$HOME/web/blog/k0s/entries/public/$1"
423 } 428 }
429
430 ###
424 431
425 flatten() { 432 flatten() {
426 directory=$PWD 433 directory=$PWD
427 if [ "$#" == "1" ] 434 if [ "$#" == "1" ]
428 then 435 then