Answer:
There is a unix command, dos2unix, that will clean them up. Suppose you downloaded Hw1.java from your home computer to your unix account using FTP. To convert it, on your unix account type,
dos2unix Hw1.java > tempThis will put the cleaned up version into the file named temp. The first time you might want to check temp using the editor and make sure it looks ok. Once you are sure temp has been cleaned up type:
mv temp Hw1.javawhich will replace Hw1.java with temp (MoVe temp to Hw1.java). It will probably ask you if you really want to replace the existing Hw1.java. Answer yes.
You may also need to fix up the indentation. Sorry, no automatic program for that. If you use emacs, open the file with emacs and then type the following:
Move the cursor to the beginning of the buffer (ctrl-<) and set the mark (ctrl-space). Then move the cursor to the end of the buffer (ctrl->) and type esc-x indent-region.
This do emacs indenting for the entire file.
If you are new to emacs, remember ctrl-< means hold down the Ctrl key (like a shift key) and press < (which will also require you to hold down the shift key). esc-x means hit the esc key and then the x key.
You should probably try this on a copy of your program the first time, in case you goof it up.
After re-indenting with emacs do NOT FORGET to replace the tabs it will insert with spaces. See http://www.cse.ucsc.edu/classes/cmps012a/Fall06/hw/expand.txt