diff --git a/src/iocsh/iocsh.cpp b/src/iocsh/iocsh.cpp index e7fc36f00..c4c17a6d0 100644 --- a/src/iocsh/iocsh.cpp +++ b/src/iocsh/iocsh.cpp @@ -334,10 +334,14 @@ iocsh (const char *pathname) lineno++; /* - * Ignore comment lines + * Ignore comment lines other than to echo + * them if they came from a script. */ - if (*raw == '#') + if (*raw == '#') { + if (prompt == NULL) + puts(raw); continue; + } /* * Expand macros