systemfunc question

From: Mark Snyder <msnyder_at_nyahnyahspammersnyahnyah>
Date: Mon May 31 2010 - 16:32:30 MDT

Hi,

I'm attempting to read a string from a text file using systemfunc:

begin

proj = systemfunc("grep "parameter(iproj=" domain.param | sed "s/parameter(iproj='\(\w\+\)'.*/\1/"")
print(proj)

end

And it seems that NCL is balking at the ( between parameter and iproj (note the dashes are shorter in the email than what appears in the terminal, so the ^ points to the end of the line). I was looking at the documentation for a way to escape the ( but didn't find anything.

 Copyright (C) 1995-2009 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.1.1
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
fatal:syntax error: line 6 in file read_domain.param.ncl before or near parameter
proj = systemfunc("grep "parameter
---------------------------------^

fatal:Syntax Error in block, block not executed
fatal:error at line 9 in file read_domain.param.ncl

Thanks,
Mark

--
Mark A. Snyder, PhD | Assistant Project Earth Scientist
Climate Change and Impacts Laboratory
Dept. of Earth and Planetary Sciences
University of California, Santa Cruz
(W) 831-459-3504 | msnyder@pmc.ucsc.edu
http://es.ucsc.edu/~msnyder
--


_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Mon May 31 16:32:47 2010

This archive was generated by hypermail 2.1.8 : Tue Jun 01 2010 - 09:12:20 MDT