From b5010d5759a778e8cfa5b5c59a5dc7acd2334063 Mon Sep 17 00:00:00 2001 From: 12425 Date: Sun, 4 Apr 2021 18:05:28 -0700 Subject: [PATCH] Fix for Windows (#2) Windows sqlite3.exe generates file in dos format and the extra `\r` causes wrong curl command and deletion failure. Instead of `cat` lines, use `sed` to trim the `\r`. --- jnrmor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jnrmor b/jnrmor index fd47e2a..6f1f688 100755 --- a/jnrmor +++ b/jnrmor @@ -280,7 +280,7 @@ if [ "$fflag" != "1" ]; then fi fi -for id in `cat $TMPFILE` +for id in `sed 's/\s\+$//' $TMPFILE` do curlCMD="curl -s -X DELETE http://localhost:${CLIPPER_PORT}/resources/${id}?token=${CLIPPER_TOKEN}" debug "$curlCMD"