'Shell Script Error No such file or directory

i tried to execute an easy shell skript with curl comand.

#!/usr/bin/env bash
.~/.foo
curl -n ${URL}/submit/foo/netrc

i executed this shell script with sudo rights and got the error message /root/.foo No such file or directory This hidden file .foo has an variable URL. If i executed this script without sudo rights. I got the error forbidden. Where is my mistake ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source