diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-12-11 10:24:56 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-12-11 10:24:56 -0800 |
commit | 4a26e01aedbbee2092a0d3c547cb2061d2305a6d (patch) | |
tree | 13b34067f76cd35ff41c4c5a722856ce75ced442 /etc/bash_completion.d | |
parent | 688433f5c3da09c9de19fec8d6217764bb5a036c (diff) | |
download | vyatta-op-4a26e01aedbbee2092a0d3c547cb2061d2305a6d.tar.gz vyatta-op-4a26e01aedbbee2092a0d3c547cb2061d2305a6d.zip |
implement "pipe" commands as functions
Diffstat (limited to 'etc/bash_completion.d')
-rw-r--r-- | etc/bash_completion.d/10vyatta-op | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op index 52be05a..d5ea362 100644 --- a/etc/bash_completion.d/10vyatta-op +++ b/etc/bash_completion.d/10vyatta-op @@ -291,6 +291,27 @@ _vyatta_op_run () return $ret } +# "pipe" functions +count () +{ + wc -l "$@" +} + +match () +{ + grep -E -e "$@" +} + +no-match () +{ + grep -E -v -e "$@" +} + +no-more () +{ + cat "$@" +} + # don't initialize if we are in configure mode if [ "$_OFR_CONFIGURE" == "ok" ]; then return 0 |