Skip to content
Advertisement

How to save the text from a link in bash file?

I am trying to write a script that automatically makes a new website on my server.

one of the steps is to go to this link and copy the salts into my wp-config.php file:

https://api.wordpress.org/secret-key/1.1/salt/

I’m new to bash script and hoping this would be easy to do.

I’m not sure if I need to save it as a text first, but ultimately I need to replace this part in my wp-config.php:

JavaScript

with the results from that link.

Advertisement

Answer

Using awk

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement