commit 7fc6d3fe34290df2b6747c97bb812bb69cc1d710
parent b2a0d34897b7635ca847759ddfb0fbcfc54765dd
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:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
@@ -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:
diff --git a/canteeninfo b/canteeninfo
@@ -1,5 +1,5 @@
#!/bin/bash
-out=$(pwd)/canteeninfo.html
+#out=$(pwd)/canteeninfo.html
weekday=$(date +%A)
highlight="1234567890asdfasdf"
@@ -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