home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the DOOM Gurus / TricksOfTheDoomGurus.iso / bonus / linux / waddir / wdircvt.pl < prev   
Perl Script  |  1994-07-12  |  319b  |  17 lines

  1. #!/usr/bin/perl
  2. #
  3. #    Convert waddir output into a directory listing...
  4.  
  5. while (<STDIN>) {
  6.     if ( /^#/ ) {
  7.         print;
  8.         next;
  9.     }
  10.     # Break the line into it's components...
  11.     /^([^\s]+)\s+([^\s]+)\s+([^\s]+)/;
  12.     $DOSpath=$1;
  13.     $WADpath=$2;
  14.     $WADlen=$3;
  15.     printf("%-20s %-20s %d\n", $DOSpath, $WADpath, $WADlen);
  16. }
  17.