Index: branches/eam_branches/ipp-20191011/Nebulous/bin/neb-stat
===================================================================
--- branches/eam_branches/ipp-20191011/Nebulous/bin/neb-stat	(revision 41053)
+++ branches/eam_branches/ipp-20191011/Nebulous/bin/neb-stat	(revision 41054)
@@ -19,21 +19,23 @@
 use URI;
 
-my ($validate,$server,$nouris);
+my ($validate,$server,$nouris,$help);
 
 $server = $ENV{'NEB_SERVER'} unless $server;
 
 GetOptions(
-    'server|s=s'     => \$server,
-    'validate|v'         => \$validate,
-    'files'          => \$nouris,
+    'server|s=s'    => \$server,
+    'validate|v'    => \$validate,
+    'files|f'       => \$nouris,
+    'help|h'        => \$help,
 ) || pod2usage( 2 );
 
+# explicitly defined -h / --help:
+if ($help) { pod2usage( -verbose => 1 ); }
+
 my $key = shift;
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
-pod2usage( -msg => "Required options: --server", -exitval => 2 )
-    unless $server;
-pod2usage( -msg => "missing key", exitval => 2 )
-    unless defined $key;
+pod2usage( -msg => "Required options: --server", -exitval => 2 ) unless $server;
+pod2usage( -msg => "missing key", exitval => 2 ) unless defined $key;
 
 my $neb = Nebulous::Client->new(
@@ -75,10 +77,10 @@
 	    $md5sum_uniq{$md5sums[$i]} = 1;
 	    close($fh);
-	}
-	else {
+	} else {
 	    $existance[$i] = 0;
 	    $md5sums[$i] = 'NON-EXISTANT';
 	    $md5sum_uniq{$md5sums[$i]} = 1;
 	}
+
 	if (defined($nouris)) {
 	    $validation[$i] = sprintf("% 3d %32s %s",
@@ -86,6 +88,5 @@
 				      $md5sums[$i],
 				      $files[$i]);
-	}
-	else {
+	} else {
 	    $validation[$i] = sprintf("% 3d %32s %s",
 				      $existance[$i],
@@ -113,20 +114,39 @@
 	"instance location:\n", " " x 4,
 	join("\n" . " " x 4, @validation), "\n";
+} else {
+    
+    if (defined($nouris)) {
+	my @files = map {URI->new($_)->file if $_} @$instances;
+
+	print
+	    "object id:             ", @$stat[0], "\n",
+	    "key:                   ", @$stat[1], "\n",
+	    "read lock:             ", @$stat[2], "\n",
+	    "write lock:            ", @$stat[3], "\n",
+	    "epoch:                 ", @$stat[4], "\n",
+	    "mtime:                 ", @$stat[5], "\n",
+	    "available instances:   ", @$stat[6], "\n",
+	    "requested instances:   ", $user_copies, "\n",
+	    "total instances:       ", @$stat[7], "\n",
+	    
+	    "instance location:\n", " " x 4,
+	    join("\n" . " " x 4, @files), "\n";
+    } else {
+	print
+	    "object id:             ", @$stat[0], "\n",
+	    "key:                   ", @$stat[1], "\n",
+	    "read lock:             ", @$stat[2], "\n",
+	    "write lock:            ", @$stat[3], "\n",
+	    "epoch:                 ", @$stat[4], "\n",
+	    "mtime:                 ", @$stat[5], "\n",
+	    "available instances:   ", @$stat[6], "\n",
+	    "requested instances:   ", $user_copies, "\n",
+	    "total instances:       ", @$stat[7], "\n",
+	    
+	    "instance location:\n", " " x 4,
+	    join("\n" . " " x 4, @$instances), "\n";
+    }
+
 }
-else {
-    print
-	"object id:             ", @$stat[0], "\n",
-	"key:                   ", @$stat[1], "\n",
-	"read lock:             ", @$stat[2], "\n",
-	"write lock:            ", @$stat[3], "\n",
-	"epoch:                 ", @$stat[4], "\n",
-	"mtime:                 ", @$stat[5], "\n",
-	"available instances:   ", @$stat[6], "\n",
-	"requested instances:   ", $user_copies, "\n",
-	"total instances:       ", @$stat[7], "\n",
-	
-	"instance location:\n", " " x 4,
-	join("\n" . " " x 4, @$instances), "\n";
-}
 
 
@@ -151,5 +171,5 @@
 =over 4
 
-=item * --server|-s <URL>
+=item  --server|-s <URL>
 
 URL of the Nebulous server to connect to.
@@ -157,9 +177,9 @@
 Optional if the appropriate environment variable is set.
 
-=item * --validate|-v
+=item --validate|-v
 
 Optional - prints out additional information including md5sum.
 
-=item * --files
+=item --files
 
 Optional - prints out disk files instead of uris during validate stage.
@@ -175,5 +195,5 @@
 =over 4
 
-=item * C<NEB_SERVER>
+=item C<NEB_SERVER>
 
 Equivalent to --server|-s
