쉘 스크립트에서 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