3 ms·
You could make curl read netrc from a pipe. Something like this should work: #!/bin/bash password=$(...) # replace with code to extract password from the
by jwilk 9y ago
You could make curl read netrc from a pipe.
Something like this should work:
#!/bin/bash
password=$(...) # replace with code to extract password from the the password manager
generate_netrc()
{
printf 'machine www.example.org login foo password "%s"\n' "$password"
}
curl -v --netrc-file <(generate_netrc) http://www.example.org
No need for sudo and no risk of hitting swap. :-)