Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
619 B

  1. #
  2. # This perl script removes extra lines & spaces from a file
  3. #
  4. while (<STDIN>) {
  5. $line = $_;
  6. #
  7. # Remove blank lines
  8. #
  9. if ($line =~ /^\s*$/) {
  10. ;
  11. } else {
  12. #
  13. # Remove extra spaces from the file and then remove any spaces at
  14. # the beginning & end of each line
  15. #
  16. $line =~ s/\s+/ /g;
  17. $line =~ s/^\s//g;
  18. $line =~ s/\s$//g;
  19. print "$line\n";
  20. }
  21. }
  22. #
  23. # This script replaces the sed script dlg.sed
  24. #
  25. # /^$/d
  26. # /^ *$/d
  27. # s/ / /g
  28. # s/ / /g
  29. # s/^ //g
  30. #