Simplified revlines(1).
authorshort <>
Wed, 14 Sep 2005 03:22:04 +0000 (03:22 +0000)
committershort <>
Wed, 14 Sep 2005 03:22:04 +0000 (03:22 +0000)
.bashrc

diff --git a/.bashrc b/.bashrc
index c87c1b7..cbf93fd 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -229,7 +229,7 @@ function ctags {(unset ctags;
 function ctagsh { ctags "--c-types=+px"; }; export -f ctagsh
 function cpan {(unset cpan; if [ $# = 0 ];then cpan;else perl -MCPAN -e "install qw($*);";fi; );}; export -f cpan
 function exx { cd "`unset exx;exx "$@"|tee /proc/self/fd/2|tail -n1|sed -n 's/^extdir=//p'`"; };export -f exx
-function revlines { perl -e 'my @r=();push @r,$_ while (<>);print pop @r while @r;'; }; export -f revlines
+function revlines { perl -e 'print reverse <>;'; }; export -f revlines
 
 ulimit -S -c 0
 set +H