This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
data=${1:-$(date +%d.%m.%Y --date yesterday)} | |
# run with date on format dd.mm.yyyy as argument, without arguments takes yesterday | |
# skip run if already done, to be started multiple times per day due to elicznik api instability | |
[ $(ls -l /tmp/fetch_elicznik*"$data" 2>/dev/null | wc -l) -eq 2 ] && exit | |
login="xxxxx" | |
password="xxxxx" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if which upsc > /dev/null 2>&1 ; then | |
echo '<<<nut>>>' | |
for ups in $(upsc -l) | |
do | |
upsc $ups| sed "s,^,$ups ," | |
done | |
fi |