2

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?

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265

1 Answers1

2

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

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265