Transferring files from Windows to Unix
Be very careful transferring files from Windows to Unix. If you do transfer a file from Windows to Unix open the file, in Unix, using vi.
For example, if you transferred a file named drivers.txt from Windows to Unix open the file in Unix with the command
vi -b drivers.txt
you will (might) see a lot of ^M's at the end of each line.
These MUST be removed using the command shown below or else your input file will have too many newline characters and will not translate properly. That is, your code will not correctly read the input file. You will have an extra newline at the end of every line of your file in Unix. Your code will work on Windows but NOT on Unix.
Still in vi, in command mode (press the Esc key first) do the following
:%s/ctrl-v ctrl-m//g
ctrl-v ctrl-m means hold down the control key and with the control key down press v then press m.