How to pass Password to wget in Script

  • Hi,

    I have been running a script on another rpi for quite some time (4-5 years), but it broke down and now I want to get rid of it and use libreelec as my only 24/7 device (besides the router). I have writen a backup script to download my contacts and calendars from my nextcloud every night to make sure I will not loose anthing from the nextcloud because of some mistake in thunderbird or whatever...

    Unfortunately i have been trouble to use wget on libreelec. I am not able to provide the --password (--user works!) and neither can I provide a .wgetrc nor change somehow the path where to find the .wgetrc (it is directly lying next to the .sh).

    The only way which works is wget http://user:password@nextcloudadress, which is not really how i thought this should be :(

    GNU Wget 1.20 Manual

    May anybody help me?

    Regards,

    Linkin

    PS; How do i delete the History in the terminal? I tried a lot and history -c didnt work...

    edit: found it: > ~/.ash_history

    SSH history

    Edited 4 times, last by Linkinsoldier (October 20, 2019 at 11:39 AM).

  • just use curl (much more features compared to wget)

    curl -u username:password http://example.com

    otherwise pls provide your current script, likely we can easily help