2
Cara membuat variabel dari subkulit yang tersedia di shell induk
Saya telah menulis skrip cepat dan kotor untuk mencatat waktu beberapa laporan dari layanan web: BASE_URL='http://example.com/json/webservice/' FIRST=1 FINAL=10000 for report_code in $(seq 1 $FINAL); do (time -p response=$(curl --write-out %{http_code} --silent -O ${BASE_URL}/${report_code}) ) 2> ${report_code}.time echo $response # <------- this is out of scope! How do I fix that? …