0
curl -s http://meet97263421.adobeconnect.com/api/xml?action=common-info | \
grep -oP '(?<=<cookie>).*?(?=</cookie>)|(?<=account-id=").*?(?=")' 2>&1\

The above curl/grep command returns the following data:

na3breezswp8yf3s5fghdgn4
1013353222

How do I send these two outputs to a second curl command:

curl "https://meet97263421.adobeconnect.com/api/xml?\
action=login&login=USERNAME&password=PASSWORD&account-id=[$1]&session=[$0]"

I'm using [$1] and [$0] as place holders.

1 Answer 1

1

Maybe this help:

#!/bin/bash

OUT=$(curl -s http://meet97263421.adobeconnect.com/api/xml?action=common-info \
| grep -oP '(?<=<cookie>).*?(?=</cookie>)|(?<=account-id=").*?(?=")')

# echo $OUT && echo 

Session=$(cut -f1 -d' ' <<< $OUT)
AccountID=$(cut -f2 -d' ' <<< $OUT)

curl "https://meet97263421.adobeconnect.com/api/xml?action=login&login=USERNAME&password=PASSWORD&account-id=$AccountID&session=$Session"

# or 

curl "https://meet97263421.adobeconnect.com/api/xml?action=login&login=USERNAME&password=PASSWORD&account-id=`cut -f2 -d' ' <<< $OUT`&session=`cut -f1 -d' ' <<< $OUT`"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.