summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-12-11 10:24:56 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-12-11 10:24:56 -0800
commit4a26e01aedbbee2092a0d3c547cb2061d2305a6d (patch)
tree13b34067f76cd35ff41c4c5a722856ce75ced442 /etc
parent688433f5c3da09c9de19fec8d6217764bb5a036c (diff)
downloadvyatta-op-4a26e01aedbbee2092a0d3c547cb2061d2305a6d.tar.gz
vyatta-op-4a26e01aedbbee2092a0d3c547cb2061d2305a6d.zip
implement "pipe" commands as functions
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/10vyatta-op21
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