[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: single spaces in outfile
Laura Miller <email@example.com> wrote
I am using the outfile command to output a file with nine variables.
all of fixed width but some are string and some are numeric. My
problem is when
it outputs the file it leaves several spaces between the variables. I
need it to
leave just one space between them (for inputting to another program).
I know the
runtogether option allows for no spaces. Is there a command that
one space between the variables?
>>> You could whip up a program using -file-, but
even quicker is to use a good text editor with
the facility to select and remove rectangular blocks of
text, or to do this in some other way, e.g. by
a global search and replace for multiple spaces.
Alternatively, if there are no commas in your string variables,
-outsheet- as comma-separated variables and do a global
search and replace of commas by spaces.
Alternatively, a script in Awk or Perl or Python
or some other scripting language would do the job.
The internet is awash with downloadable text editors,
many freeware or shareware. Much advice for Stata users
on some of the good (and also on a couple of the bad and
the ugly) is gathered from some seventeen of us at
This gives me an opportunity to flag the latest
update of that FAQ, a section on EmEditor by
Friedrich Huebler, added on 12 August.
* For searches and help try: