Index: trunk/Ohana/src/opihi/lib.shell/version.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/version.c	(revision 4748)
+++ trunk/Ohana/src/opihi/lib.shell/version.c	(revision 8174)
@@ -1,4 +1,5 @@
 # include "shell.h"
 
+static char *unknown = "UNKNOWN";
 static char *name = "$Name: not supported by cvs2svn $";
 
@@ -6,2 +7,22 @@
   return (name);
 }
+
+/* expect a line of the form "$Name: not supported by cvs2svn $", strip out contents */
+char *strip_version (char *input) {
+
+  char *p, *q;
+
+  p = strcasestr (input, "$NAME:");
+  if (p == NULL) return (unknown);
+
+  q = strcreate (input + 6);
+  p = strrchr (q, '$');
+  if (p != NULL) *p = 0;
+  stripwhite (q);
+  if (*q == 0) {
+    free (q);
+    q = strcreate ("NONE");
+  }
+
+  return (q);
+}
