Enhanced onos-log to allow remotely grepping through the logs. usage: onos-log [-l] [remote-ip [{karaf-instance-id|-} [ere-pattern]]]

Change-Id: I598f0f5dd5f7f5436c0459f93944d0303cfa355e
diff --git a/tools/test/bin/onos-log b/tools/test/bin/onos-log
index 0022a95..b8c5bf4 100755
--- a/tools/test/bin/onos-log
+++ b/tools/test/bin/onos-log
@@ -15,13 +15,17 @@
 remote=$ONOS_USER@${remote:-$OCI}
 instance=$2
 
-[ -n "$instance" ] && \
+pattern=$3
+
+[ -n "$instance" -a "$instance" != "-" ] && \
     LOG=$ONOS_INSTALL_DIR/$KARAF_DIST/instances/$instance/data/log/karaf.log || \
     LOG=$ONOS_INSTALL_DIR/log/karaf.log
 
 
 if [ $less -eq 1 ]; then
     ssh -t $remote "less $LOG"
+elif [ -n "$pattern" ]; then
+    ssh $remote "grep $LOG -Ee \"$pattern\""
 else
     ssh -t $remote "
     while true; do