Hi Jerome,
You don't need the outer grave-accents on the "let isfile" command. This should work - define the _expression_ in one command, evaluate it in the next.
repeat/range=1998:2010/name=yr ( \
let fname = "`URLname`/dataset_`yr`.nc"; \
let isfile = test_opendap("`fname`"); \
if `isfile eq 0` then; ...)
On 7/26/2017 2:42 PM, Jerome Fiechter wrote:
JeromeThanks,Any help would be much appreciated.The command `test_opendap("`fname`")` is what's causing the problem, but I cannot figure out how to pass a variable file name to the test_opendap function without using a nested `.if `isfile eq 0` then; ...)let isfile = `test_opendap("`fname`")`; \let fname = "`URLname`/dataset_`yr`.nc"; \repeat/range=1998:2010/name=yr ( \Hi,I am trying to use "test_opendap" within a loop that generate a URL name, but I end up getting an "unclosed quotation error" because of nested `. My script looks like: