ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
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.

rmvspcs 358 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # 4-2020 Ken
  3. echo "Input file to clean leading spaces "
  4. read infile
  5. if [ -r $infile ]
  6. then
  7. echo "Wait, copying original input file to $infile.cpy"
  8. cp $infile $infile.cpy
  9. else
  10. echo "Input file is unreadable"
  11. exit 1
  12. fi
  13. # Sucessively delete leading spaces
  14. ed $infile <<!
  15. 1,\$ s/^ //
  16. 1,\$ s/^ //
  17. 1,\$ s/^ //
  18. 1,\$ s/^ //
  19. w $infile
  20. \$=
  21. q
  22. !
  23. exit 0