AnsweredAssumed Answered

Problem with "export reports" in text formats

Question asked by DavidSmith_4 on Dec 30, 2014
Latest reply on Jan 23, 2015 by TSGal

Summary

Problem with "export reports" in text formats

Product

FileMaker Pro

Version

13

Operating system version

Mac OS

Description of the issue

When exporting records to a tab delimited file, the records are separated by a \r not at \n.  This means that the standard Mac tools (e.g awk, grep, sed, wc, etc.) can not correctly parse the file because there are no newlines in the file.

Steps to reproduce the problem

export a set of records to filename.tab using Tab delimited and selecting "Macintosh" character set.

type "wc -l filename.tab" in a terminal window

Expected result

you should get the number lines in the file (ie the number of records)

Actual result

you get 0

Workaround

perl -pi -e 's/\r/\n/g' < filename.tab  > filename.tab.unix

running the above in a terminal window will replace all of the \r with \n in the file, and then wc and other Unix command line tools will correctly parse the file.

Outcomes