<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: [BLDG-SIM] eQuest: macro for extracting data from a sim file</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007>All,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007>See <A
href="http://elcca-exchange.blogspot.com/2007/11/sed-equest-sim-file-reports.html">this
post</A> for an example script using SED to extract an individual report from a
SIM file. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007>But wait, there's more! Using the 'FOR' command,
it can also extract every similar report from all SIM files in a directory
and save them to single file for further processing (with say Awk, for
instance ;-) or output. Its beginning to look to me like SED is
most useful for gross editing tasks -- i.e. global search-and-replacements
or chunking out reports. SED = sledgehammer</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007>Looks like Awk will be the ticket for precision tasks
like selecting an individual data value, doing arithmetic on
columns, or creating your own outside air loads report. Awk =
scalpel</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007>More fun with SED & AWK coming in the months
ahead...Jeff, would you mind sharing some of your favorite Awk scripts?
There is a basic one by Joe Huang in the archives. Perhaps you have an
indispensable gem like say, an Outside Air Loads Report?
;-)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=877454604-06112007>Thanks</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">
<DIV><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><SPAN
class=212011020-11052004><FONT color=#000000>Brandon Nichols,
PE, LEED<SUP><SPAN style="FONT-SIZE: 8pt">®</SPAN></SUP>
AP</FONT></SPAN></SPAN></DIV>
<DIV><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><SPAN
class=212011020-11052004><FONT
color=#000000>Mechanical</FONT></SPAN></SPAN></DIV>
<DIV><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><FONT
color=#000080><STRONG>HARGIS ENGINEERS</STRONG></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><FONT
color=#515151>600 Stewart Street</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><FONT
color=#515151>Suite 1000</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><FONT
color=#515151>Seattle, WA 98101<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><FONT
color=#515151>www.hargis.biz<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><FONT
color=#515151> <o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><B><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">d
|</SPAN></B><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">
206.436.04<SPAN class=212011020-11052004>0</SPAN>0<SPAN
style="mso-spacerun: yes"> </SPAN><B>c | </B>206.<SPAN
class=212011020-11052004>228.8707</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><SPAN
class=212011020-11052004></SPAN></SPAN><FONT color=#515151><B><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">o
|</SPAN></B><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">
206.448.3376<SPAN style="mso-spacerun: yes"> </SPAN><B>f <SPAN
style="mso-spacerun: yes"> </SPAN>|</B>
206.448.4450</SPAN></FONT></P></SPAN></SPAN>
<DIV> </DIV></DIV>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> BLDG-SIM@gard.com
[mailto:BLDG-SIM@gard.com] <B>On Behalf Of </B>Brandon Nichols<BR><B>Sent:</B>
Monday, November 05, 2007 7:21 AM<BR><B>To:</B>
BLDG-SIM@gard.com<BR><B>Subject:</B> [BLDG-SIM] eQuest: macro for extracting
data from a sim file<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/plain format --><BR>
<P><FONT size=2>Awk is also a good choice, here's an editorial comparison of Awk
vs. SED, with a link to tutorials for each:<BR><BR><A
href="http://unix.derkeiler.com/Newsgroups/comp.unix.shell/2004-08/0405.html">http://unix.derkeiler.com/Newsgroups/comp.unix.shell/2004-08/0405.html</A><BR><BR>Awk
is a programming language with arithmetic operators, array handling etc., SED is
essentially batch application of regular expressions. <BR><BR>Given the
platform independence of regular expressions, SED is my cup of tea. But as
Jeff states the case, Awk would be an excellent tool for a data extraction task
-- back in the dark ages of DOS, I used Awk years before learning SED to strip
the colors from AutoCAD DXF files.<BR><BR>Brandon<BR><BR><BR><BR>-----Original
Message-----<BR>From: BLDG-SIM@gard.com on behalf of Jeff
Haberl<BR>Sent: Sat 11/3/2007 7:07 PM<BR>To:
BLDG-SIM@gard.com<BR>Cc: <BR>Subject:
[BLDG-SIM] eQuest: macro for extracting data from a sim
file<BR><BR>Jessica.<BR><BR>We use AWK, which can be obtained from Gnu software
for a modest donation (I.e. GAWK). Its incredibly powerful, and has a long
history from its origin at Bell labs as a unix toolkit. There are several good
books on AWK, including one by its creators: Aho, Weinberger and
Kernigan.<BR><BR>This work well on the FORTRAN-formatted output from
DOE-2.<BR><BR>Jeff <BR>BB 8=! 8=) :=) 8=) ;=)
8=) 8=( 8=) :=') 8=) 8=) 8=? BB<BR><BR>Jeff
S. Haberl, Ph.D.,
P.E.............................jhaberl@esl.tamu.edu<BR><BR>Professor......................................................Office
Ph: 979-845-6507<BR><BR>Department of Architecture.......................Lab Ph:
979-845-6065<BR><BR>Energy Systems Laboratory.......................FAX:
979-862-2457<BR><BR>Texas A&M
University..............................77843-3581<BR><BR>College Station,
Texas, USA.......................URL: www-esl.tamu.edu<BR><BR>BB 8=/
8=) :=) 8=) ;=) 8=) 8=() 8=) 8=?
8=) 8=) 8= BB<BR><BR><BR>----- Original Message -----<BR>From:
BLDG-SIM@gard.com <BLDG-SIM@gard.com><BR>To: BLDG-SIM@gard.com
<BLDG-SIM@gard.com><BR>Sent: Fri Nov 02 16:35:03 2007<BR>Subject:
[BLDG-SIM] eQuest: macro for extracting data from a sim file<BR><BR>I need to
extract data from a sim file. I have over 1600 runs to make and need only one
piece of data from the SIM file. Has anyone put together a macro like this
before? Examples...<BR><BR>Thanks, Jessica<BR><BR><BR>Jessica E.
McCready<BR>Energy Engineer<BR>KEMA Services Inc.<BR>492 Ninth Street, Suite
220<BR>Oakland, CA 94607<BR>T 510-891-0446<BR>F
510-891-0440<BR>jessica.mccready@kema.com<BR>Please visit our website
www.kema.com <<A
href="file://www.kema.com">file://www.kema.com</A>> <BR><BR><BR><BR>==================<BR>You
received this e-mail because you are subscribed<BR>to the BLDG-SIM@GARD.COM
mailing list. To unsubscribe<BR>from this mailing list send a blank
message to<BR>BLDG-SIM-UNSUBSCRIBE@GARD.COM<BR><BR><BR><BR><BR></FONT></P><PRE>
==================
You received this e-mail because you are subscribed
to the BLDG-SIM@GARD.COM mailing list. To unsubscribe
from this mailing list send a blank message to
BLDG-SIM-UNSUBSCRIBE@GARD.COM
</PRE><PRE>
===========================
You received this e-mail because you are subscribed
to the BLDG-SIM@GARD.COM mailing list. To unsubscribe
from this mailing list send a blank message to
BLDG-SIM-UNSUBSCRIBE@GARD.COM
</PRE></BODY></HTML>