From: W. Trevor King Date: Sat, 21 Sep 2013 17:18:15 +0000 (-0700) Subject: monfold.sh: Use here-documents to write GPFILE X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=04a537972901286f54e3841084c76d19f20c9b57;p=blog.git 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 --- 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