Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- _RESPONSE=$(curl -u usr:pass -s %IP/REST?API....%)
- _GREP=$(cat -A $_RESPONSE | grep -Po '"toString":.*?[^\]".')
- _MATCH=$(cat $_GREP | sed -n 's/.*(AAA[\/]BBB[\/]CCC[\/]DDD[\/]EEE).*/1/p')
- echo "$_MATCH"
- echo "$_REPONSE"
- if grep -p fresh $_MATCH; then
- echo found
- else
- echo not found
- fi
Add Comment
Please, Sign In to add comment