Last active
December 11, 2021 14:44
-
-
Save WProbot/8edee562d493149f7b85eed9fc381f64 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| # | |
| # ide kerül => /etc/cron.weekly/callsign-weekly | |
| # | |
| export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin | |
| OD=/netpub/wwwroot/breko.hu/callsign | |
| OF=call_sign_book.csv | |
| mkdir -p $OD | |
| curl -s https://nmhh.hu/amator/call_sign_book.xml | gawk ' | |
| /<Row>/ { | |
| for(q=0; 14 > q; q++) { | |
| getline; | |
| gsub("<[^>]*>", ""); | |
| printf "\"%s\",", $0; | |
| } | |
| getline; | |
| gsub("<[^>]*>", ""); | |
| printf "\"%s\"\n", $0; | |
| } | |
| ' | iconv -f iso-8859-2 -t utf8 > $OD/$OF | |
| chown balint:balint $OD | |
| chown balint:balint $OD/$OF | |
| exit 0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment