Index: trunk/ippTools/src/Makefile.am
===================================================================
--- trunk/ippTools/src/Makefile.am	(revision 6670)
+++ trunk/ippTools/src/Makefile.am	(revision 6833)
@@ -1,5 +1,5 @@
-bin_PROGRAMS = pxadmin pzsearch p2search p0search
+bin_PROGRAMS = pxadmin pzsearch p2search p0search pzgetexp
 
-include_HEADERS = pxtools.h
+include_HEADERS = pxtools.h slurp.h
 lib_LTLIBRARIES = libpxtools.la
 libpxtools_la_CFLAGS	= $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(METADATADB_CFLAGS) $(pxtools_CFLAGS)
@@ -15,5 +15,6 @@
 	pxconfig.c \
 	pxframes.c \
-    pxtables.c
+    pxtables.c \
+	slurp.c
 
 # for pxtools.h
@@ -44,4 +45,9 @@
     pxadminConfig.c
 
+pzgetexp_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(METADATADB_CFLAGS) $(pxtools_CFLAGS)
+pzgetexp_LDADD = $(PSLIB_LIBS) $(PSMODULES_LIBS) $(METADATADB_LIBS) $(top_builddir)/src/libpxtools.la
+pzgetexp_SOURCES = \
+    pzgetexp.c
+
 clean-local:
 	-rm -f TAGS
Index: trunk/ippTools/src/pxtools.h
===================================================================
--- trunk/ippTools/src/pxtools.h	(revision 6670)
+++ trunk/ippTools/src/pxtools.h	(revision 6833)
@@ -8,4 +8,6 @@
 # include <pmModelGroup.h>
 # include <metadatadb.h>
+
+# include <slurp.h>
 
 // load these values from the db in the init stage
Index: trunk/ippTools/src/pzgetexp.c
===================================================================
--- trunk/ippTools/src/pzgetexp.c	(revision 6833)
+++ trunk/ippTools/src/pzgetexp.c	(revision 6833)
@@ -0,0 +1,77 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "pxtools.h"
+
+//static psString slurp(FILE *stream);
+static bool parseInput();
+
+int main(int argc, char **argv)
+{
+//    pxConfig *config = pxConfigAlloc();
+
+//    pzsearchConfig(config, argc, argv);
+
+    /*
+    switch (config->mode) {
+        case PX_MODE_SEEN:
+            if (!seenMode(config)) {
+                goto FAIL;
+            }
+            break;
+        default:
+            psAbort(argv[0], "invalid option (this should not happen)");
+    }
+    */
+
+    parseInput();
+
+    exit(EXIT_SUCCESS);
+
+FAIL:
+//    psFree(config);
+    exit(EXIT_FAILURE);
+}
+
+static bool parseInput() 
+{
+    psString input = slurp(stdin);
+    psList *tokens = psStringSplit(input, " ");
+
+}
+
+/*
+#define SLURP_SIZE 1024
+static psString slurp(FILE *stream) 
+{
+    psString str    = NULL;
+    size_t strSize  = 1; // bytes allocated -  make sure there is room for '\0'
+    size_t used     = 0; // bytes actually used
+
+    for (;;) {
+        // increase the allocated string size
+        strSize += SLURP_SIZE;
+        str = psRealloc(str, strSize);
+
+        // read a block from the stream
+        size_t bytes = fread(str + used, 1, SLURP_SIZE, stream); 
+        used += bytes;
+
+        // is this the end of the file or an error?
+        if (bytes != SLURP_SIZE) {
+            if (feof(stream)) {
+                // eof
+                break;
+            }
+            // else - it's an error
+            psError(PS_ERR_UNKNOWN, true, "slurp failed");
+            return NULL;
+        }
+    }
+
+    // append '\0' to the end of the string
+    str[used + 1] = '\0';
+
+    return str;
+}
+*/
Index: trunk/ippTools/src/slurp.c
===================================================================
--- trunk/ippTools/src/slurp.c	(revision 6833)
+++ trunk/ippTools/src/slurp.c	(revision 6833)
@@ -0,0 +1,37 @@
+#include <stdio.h>
+#include <pslib.h>
+
+#include "slurp.h"
+
+psString slurp(FILE *stream)
+{
+    psString str    = NULL;
+    size_t strSize  = 1; // bytes allocated -  make sure there is room for '\0'
+    size_t used     = 0; // bytes actually used
+
+    for (;;) {
+        // increase the allocated string size
+        strSize += SLURP_SIZE;
+        str = psRealloc(str, strSize);
+
+        // read a block from the stream
+        size_t bytes = fread(str + used, 1, SLURP_SIZE, stream);
+        used += bytes;
+
+        // is this the end of the file or an error?
+        if (bytes != SLURP_SIZE) {
+            if (feof(stream)) {
+                // eof
+                break;
+            }
+            // else - it's an error
+            psError(PS_ERR_UNKNOWN, true, "slurp failed");
+            return NULL;
+        }
+    }
+
+    // append '\0' to the end of the string
+    str[used + 1] = '\0';
+
+    return str;
+}
Index: trunk/ippTools/src/slurp.h
===================================================================
--- trunk/ippTools/src/slurp.h	(revision 6833)
+++ trunk/ippTools/src/slurp.h	(revision 6833)
@@ -0,0 +1,6 @@
+#include <stdio.h>
+#include <pslib.h>
+
+# define SLURP_SIZE 1024
+
+psString slurp(FILE *stream);
