linux 썸네일형 리스트형 [정규표현식] 정규표현식 사용 예.. 1 #!/bin/sh 2 3 if [[ $# -lt 2 ]]; then 4 echo "Usage: $0 PATTERN STRINGS..." 5 exit 1 6 fi 7 regex=$1 8 shift 9 echo "regex: $regex" 10 echo $1 11 12 while [[ $1 ]] 13 do 14 if [[ $1 =~ $regex ]]; then 15 echo "$1 matches" 16 i=1 17 n=${#BASH_REMATCH[*]} 18 while [[ $i -lt $n ]] 19 do 20 echo " capture[$i]: ${BASH_REMATCH[$i]}" 21 let i++ 22 done 23 else 24 echo "$1 does not match" 25 fi 26 shi.. 더보기 [Linux] Curl 사용해서 POST 전송 Send post with curl on linux Send data : curl -d "[parameter]&[parameter]..." [url] Upload file : curl -F upload=@[filename] -F "[params]" [url] curl -d "key=zbYcOkBxrqHoki75XaKA" myhost.com/sys/fetch_changesets GET : curl -X GET [url] POST : curl -X POST -d '{"title":"Data"}' url 더보기 이전 1 ··· 15 16 17 18 다음