Link to home
Start Free TrialLog in
Avatar of vishnu kalakota
vishnu kalakota

asked on

can i pass variable insted URL to curl in Bash?

I have link stored in a variable . can i pass that variable as url to curl
ASKER CERTIFIED SOLUTION
Avatar of Member_2_406981
Member_2_406981

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gerwin Jansen
Small addition: I'd put the URL in quotes and the variable between brackets:
some_var="http://www.experts-exchange.com"
curl ${some_var} -o output_file

Open in new window

(gets contents of this site and stores it in a file output_file)