twrite output to stdout instead of directly to file - canteen-info - scrape weekly menus from canteens surrounding Aarhus University
HTML git clone git://src.adamsgaard.dk/canteen-info
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 7fc6d3fe34290df2b6747c97bb812bb69cc1d710
DIR parent b2a0d34897b7635ca847759ddfb0fbcfc54765dd
HTML Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Wed, 25 Feb 2015 08:51:33 +0100
write output to stdout instead of directly to file
Diffstat:
M README.md | 2 +-
M canteeninfo | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
DIR diff --git a/README.md b/README.md
t@@ -24,7 +24,7 @@ webserver or transfering the file to a webserver using SCP. It is also
recommended to automatically regenerate the page with a cron job, (``crontab
-e``). For example:
- 30 * * * * canteeninfo && scp canteeninfo.html adc@fh.cs.au.dk:~/public_html_cs/files > ~/.canteeninfo.log
+ 30 * * * * canteeninfo > /tmp/canteeninfo.html && scp /tmp/canteeninfo.html adc@fh.cs.au.dk:~/public_html_cs/files > ~/.canteeninfo.log
To uninstall run:
DIR diff --git a/canteeninfo b/canteeninfo
t@@ -1,5 +1,5 @@
#!/bin/bash
-out=$(pwd)/canteeninfo.html
+#out=$(pwd)/canteeninfo.html
weekday=$(date +%A)
highlight="1234567890asdfasdf"
t@@ -77,4 +77,4 @@ echo -n "<!DOCTYPE html>
<a href='https://github.com/anders-dc/canteen-info'>Source code</a></p>
</body>
</html>" |\
- sed "s/${highlight}/<font color='red'>${highlight}<\/font>/g" > $out
+ sed "s/${highlight}/<font color='red'>${highlight}<\/font>/g" #> $out