Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Re: text file line-end characters in mixed linux /os X / windows environments
From
Kevin Geraghty <[email protected]>
To
[email protected]
Subject
st: Re: text file line-end characters in mixed linux /os X / windows environments
Date
Thu, 6 Jan 2011 12:42:16 -0800 (PST)
Thanks to all who replied to my initial inquiry. I just wanted to report that an easy way to deal with this issue turns out to be to install textpad as the default text editor on all windows machines. Unlike the preinstalled notepad and wordpad, textpad is smart enough to recognize and properly display unix line-end ASCII text and log files, and it is a "friendly" editor (as opposed to the ones where you need to remember e.g esc-Y-Return and other such cryptic command sequences).
----- "Kevin Geraghty" <[email protected]> wrote:
> I have a small garden-variety mixed-computing-environment problem, and
> am wondering if there is anything internal to stata which can be used
> to solve it. In our local computing environment we have linux, os X
> and windows hosts, and they mount the same shared volumes where we all
> store stata datasets, stata programs, and stata graphic and log file
> output. As usual it is the windows clients that have problems "playing
> well with others". The issue is when jobs are run on linux or os X
> hosts, the text log files use the unix line-end conventions which is
> just an ASCII line feed as opposed to an ASCII carriage return-line
> feed pair which is what windows expects. People opening these files
> from windows machines using standard windows text editor programs see
> everything on one line. Conversely people working on the Linux and Os
> X hosts typically use editing tools that have no trouble recognizing
> the windows line-end convention for what it is and handling it
> gracefully, so they can read log files generated by stata on windows
> without difficulties.
>
> This suggests that the easiest solution to this problem is to direct
> stata on Linux and stata on os X to use the windows, rather than the
> unix, text file line-end characters when generating text log file
> output. But I have not discovered any way to do that. There is a
> c(eolchar) which seems to only have meaning on the os X platform,
> which can direct stata to use either the unix line-end convention or
> the older mac file line end convention. But nothing equivalent on any
> platform to tell stata to use CR-LF to end text lines.
>
> Got any ideas? I am sure others have encountered this problem before.
> One could of course write some script to change the log files after
> the fact, e.g. using emacs lisp, but that is an extra step and
> something that has to be remembered as opposed to something that
> happens automatically. Maybe there is a windows text editor less
> stupid than wordpad which could be installed on all the windows
> machines? (nothing as hard to learn as the windows emacs port, though)
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/