OSSP CVS Repository

ossp - Difference in ossp-pkg/shtool/sh.path versions 1.26 and 1.27
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/shtool/sh.path 1.26 -> 1.27

--- sh.path      2004/01/01 16:54:20     1.26
+++ sh.path      2004/02/12 16:06:27     1.27
@@ -1,7 +1,6 @@
 ##
 ##  path -- Deal with program paths
 ##  Copyright (c) 1998-2004 Ralf S. Engelschall <rse@engelschall.com>
-##  Originally written for Apache
 ##
 ##  This file is part of shtool and free software; you can redistribute
 ##  it and/or modify it under the terms of the GNU General Public
@@ -165,5 +164,87 @@
         fi
     done
 done
+
 shtool_exit 1
 
+##
+##  manual page
+##
+
+=pod
+
+=head1 NAME
+
+B<shtool path> - B<GNU shtool> command dealing with shell path variables
+
+=head1 SYNOPSIS
+
+B<shtool path>
+[B<-s>|B<--suppress>]
+[B<-r>|B<--reverse>]
+[B<-d>|B<--dirname>]
+[B<-b>|B<--basename>]
+[B<-m>|B<--magic>]
+[B<-p>|B<--path> I<path>]
+I<str> [I<str> ...]
+
+=head1 DESCRIPTION
+
+This command deals with shell C<$PATH> variables. It can find a program
+through one or more filenames given by one or more I<str> arguments.
+It prints the absolute filesystem path to the program displayed on
+C<stdout> plus an exit code of 0 if it was really found.
+
+=head1 OPTIONS
+
+The following command line options are available.
+
+=over 4
+
+=item B<-s>, B<--suppress>
+
+Supress output. Useful to only test whether a program exists with the
+help of the return code.
+
+=item B<-r>, B<--reverse>
+
+Transform a forward path to a subdirectory into a reverse path.
+
+=item B<-d>, B<--dirname>
+
+Output the directory name of I<str>.
+
+=item B<-b>, B<--basename>
+
+Output the base name of I<str>.
+
+=item B<-m>, B<--magic>
+
+Enable advanced magic search for "C<perl>" and "C<cpp>".
+
+=item B<-p>, B<--path> I<path>
+
+Search in I<path>. Default is to search in $PATH.
+
+=back
+
+=head1 EXAMPLE
+
+ #   shell script
+ awk=`shtool path -p "${PATH}:." gawk nawk awk`
+ perl=`shtool path -m perl`
+ cpp=`shtool path -m cpp`
+ revpath=`shtool path -r path/to/subdir`
+
+=head1 HISTORY
+
+The B<GNU shtool> B<path> command was originally written by Ralf S.
+Engelschall E<lt>rse@engelschall.comE<gt> in 1998 for B<Apache>. It was
+later taken over into B<GNU shtool>.
+
+=head1 SEE ALSO
+
+shtool(1), which(1).
+
+=cut
+

CVSTrac 2.0.1