T
T
Tech2020-10-05 11:33:04
linux
Tech, 2020-10-05 11:33:04

Does the variable persist for the duration of the script?

The bash script has

output=$(curl ' https://example.com/api/json ' 2>/dev/null)

Further repeated use of this variable in the script leads to the execution of curl and a request to the site each time, or after being executed once, its output is stored in RAM?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lesha, 2020-10-05
@bioid

Saved

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question