Consultor Eletrônico



Kbase P102994: End quotes are missing after running quoter utility on a csv file
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/04/2005
Status: Unverified

FACT(s) (Environment):

UNIX

SYMPTOM(s):

Running quoter utility on a csv file

Quoted file is missing end quotes for the last field

CAUSE:

The csv (comma separated value) file was moved between UNIX and Windows and back to UNIX. As a result, there are hidden formatting characters in the file that prevent the proper conversion of the file by quoter.

FIX:

1. Open the csv file in a UNIX editor such as vi
2. Check for any hidden characters such as ^M
3. Close the file without changing it
4. Run this command
unix2dos filename.csv > file1.csv
5.Next run
dos2unix file1.csv > file2.csv
6. The file should now be in the proper UNIX format. This can be verified with an editor by
opening the file with vi.
7. Run quoter
quoter -d "," file2.csv > file2.quo