home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 April / PCO0499.ISO / filesbbs / os2 / apach134.arj / APACH134.ZIP / src / helpers / fp2rp < prev    next >
Encoding:
Text File  |  1998-03-20  |  235 b   |  14 lines

  1. #!/bin/sh
  2. ##
  3. ## fp2rp -- convert a standard forward path to a reverse dotted path
  4. ##
  5. if [ "x$1" = x. ]; then
  6.     rp="."
  7. else
  8.     rp=""
  9.     for pe in `IFS="$IFS/"; echo $1`; do
  10.         rp="../$rp"
  11.     done
  12. fi
  13. echo $rp | sed -e 's:/$::'
  14.