Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: re:shell


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: re:shell
Date   Sat, 7 May 2005 07:40:38 -0400

Correct, I was not trying do-file code, in which (interactive) case /* means naught. But this DOES work in do-file code;

-- start do file --
cd /applications/stata/ado/base
local c = c(alpha)

foreach w of local c {
local arg "`w'/*.ado"
di "`arg'"
ls `arg'
}
-- end do file --

Quoting the expression containing the forward slash protects it from being interpreted as a comment, and it will work in a shell command.

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index