From 04a537972901286f54e3841084c76d19f20c9b57 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Sep 2013 10:18:15 -0700 Subject: [PATCH] monfold.sh: Use here-documents to write GPFILE Instead of wasting a call to echo. Here-documents are in POSIX [1]. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04 --- posts/inotify/monfold.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/posts/inotify/monfold.sh b/posts/inotify/monfold.sh index 9344601..33d1035 100755 --- a/posts/inotify/monfold.sh +++ b/posts/inotify/monfold.sh @@ -27,9 +27,11 @@ DATALINK="./monfold.data" OUTFILE="./monfold.png" ACTION="scp $OUTFILE einstein:./public_html/rsrch/monfold.png" # upload to web -echo "set terminal png +cat > "$GPFILE" < "$GPFILE" +plot '$DATALINK' using ((\$1/2**15-1)*10):((\$2/2**15-1)*10)" +EOF # The way output from the unfolding software works, we get a bunch of # YYYYMMDDHHMMSS_unfold -- 2.26.2