Frage

I want to create an alias to get a file using cURL which prompts for the:

  • URL
  • output path
  • username and password of a proxy

How would I be able to do this interactively rather than hardcoding everything?

War es hilfreich?

Lösung

The following works as expected:

alias proxyget='read userid?"Userid: "; read passwd?"Password: "; read url?"URL: "; read local?"Local: "; curl -x 1.2.3.4:8080 -U $userid:$passwd  $url -o $local;'

References

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top