twrite output to stdout instead of directly to file - canteen-info - scrape wee… | |
git clone git://src.adamsgaard.dk/canteen-info | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 7fc6d3fe34290df2b6747c97bb812bb69cc1d710 | |
parent b2a0d34897b7635ca847759ddfb0fbcfc54765dd | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
diff --git a/README.md b/README.md | |
t@@ -24,7 +24,7 @@ webserver or transfering the file to a webserver using SCP. … | |
recommended to automatically regenerate the page with a cron job, (``crontab | |
-e``). For example: | |
- 30 * * * * canteeninfo && scp canteeninfo.html [email protected]:~/publi… | |
+ 30 * * * * canteeninfo > /tmp/canteeninfo.html && scp /tmp/canteeninfo… | |
To uninstall run: | |
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 |