I created a script that will notify when a Flash drive was inserted problem is that when I pass the variable inside the curl. Got an error 400This is the sample code I have.GET_IP=`ifconfig en1 | grep inet`Above is the variable curl -d '{color:green,message:'$GET_IP',notify:false,message_format:text}' -H 'Content-Type: application/json' https://test-rundeck.hipchat.com/v2/room/3909726/notification?auth_token=mytokenhereThanks everyone 
How to put a variable inside cURL?
bash;curl
You're setting GET_IP to the whole line from ifconfig, you need to get just the second field.GET_IP=$(ifconfig en1 | awk '$1 == inet { print $2 }')I changed from a regexp match to == so it will only match inet, not inet6.The curl line looks correct.