From 108d7441ff753bef83f674a72e1a5f95c2eb4b6b Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Fri, 13 Sep 2019 14:02:11 +0200 Subject: [PATCH] runScript does not echo lines starting with #- any more --- runScript.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runScript.c b/runScript.c index bcd5fe0..80c266b 100644 --- a/runScript.c +++ b/runScript.c @@ -203,10 +203,11 @@ int runScript(const char* filename, const char* args) } if (runScriptDebug) printf("runScript expanded line (%ld chars): '%s'\n", len, line_exp); - printf("%s\n", line_exp); p = line_exp; while (isspace((unsigned char)*p)) p++; - if (*p == 0 || *p == '#') continue; + if (p[0] != '#' || p[1] != '-') + printf("%s\n", line_exp); + if (p[0] == 0 || p[0] == '#') continue; /* find local variable assignments */ if ((x = strpbrk(p, "=(, \t\n\r")) != NULL && *x=='=')