From 22d45600fe2c48bd87737cc7fbf5e11f1dcd55a9 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sun, 13 Mar 2022 00:54:07 -0600 Subject: [PATCH] Include support for files with spaces properly. --- run.sh | 5 +++-- run.sh.bak | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/run.sh b/run.sh index bbb20d5..4911977 100644 --- a/run.sh +++ b/run.sh @@ -1,4 +1,5 @@ npm start & cd src/backend -read -e -p "Provide Log file: " log -node logreader.js $log \ No newline at end of file +for fname in "$@"; do + node logreader.js "$fname" +done \ No newline at end of file diff --git a/run.sh.bak b/run.sh.bak index 8aaded8..79cf691 100644 --- a/run.sh.bak +++ b/run.sh.bak @@ -1,3 +1,5 @@ npm start & cd src/backend -node logreader.js $1 \ No newline at end of file +for fname in "$@"; do + node logreader.js $fname +done \ No newline at end of file