シェルスクリプトでgrep結果を印刷する方法は?これは私のコードです。
#url is https://batteryzone.pk/assets/kcfinder/browse.php
read -p "Url: " url
response=$(curl -Lsk $url | grep uploadURL)
if [[ $response =~ uploadURL ]]; then
echo "$url$response"
fi
#and I want the result is $url/uploadfiles/kcfinder
結果curl -Lsk https://batteryzone.pk/assets/kcfinder/browse.php | grep uploadURL
:
$ curl -Lsk https://batteryzone.pk/assets/kcfinder/browse.php | grep uploadURL
_.uploadURL = "/assets/kcfinder/upload";
_.thumbsURL = _.uploadURL + "/.thumbs";
〜"$url$response"
になりたい$url/uploadfiles/kcfinder