hey peeps!!

Got a prob, and maybe I'm just tired. As far as I can tell, sys env vars
should be double quoted >"< inside a curl.

I've got the following couple of statements. The curls pretty much work
except the last curl, where I can't be sure exactly what the data for the
post is, as I can't display the curl with the sys env var..


Pointers would be good.

Thanks!

echo '' > 1aa.lwp

curl -vvv  -A  "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11)
Gecko/2009061118 Fedora/3.0.11-1.fc9 Firefox/3.0.11"   --cookie-jar 1aa.lwp
--cookie 1aa.lwp   -L "
https://public.lionpath.psu.edu/psp/CSPRD/EMPLOYEE/HRMS/c/COMMUNITY_ACCESS.CLASS_SEARCH.GBL
"


icsidval=$(curl -vvv  -A  "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
rv:1.9.0.11) Gecko/2009061118 Fedora/3.0.11-1.fc9 Firefox/3.0.11"
--cookie-jar 1aa.lwp --cookie 1aa.lwp     -e "
https://public.lionpath.psu.edu/psp/CSPRD/EMPLOYEE/HRMS/c/COMMUNITY_ACCESS.CLASS_SEARCH.GBL";
-L "
https://public.lionpath.psu.edu/psc/CSPRD/EMPLOYEE/HRMS/c/COMMUNITY_ACCESS.CLASS_SEARCH.GBL";
| grep ICSID | grep -oP "value='\K[^']+")

# Main request, and extracts ICSID= if needed later (per session)
icsidval=$(curl --compressed -0 -s -A 'Mozilla/5.0 (Windows NT 6.1; WOW64;
rv:38.0) Gecko/20100101 Firefox/38.0'   --cookie-jar 1aa.lwp --cookie
1aa.lwp    -H 'Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H
'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H
'Pragma: no-cache' -H 'Cache-Control: no-cache' -e '
https://my.unlv.nevada.edu/psc/lvporprd/EMPLOYEE/HRMS/c/COMMUNITY_ACCESS.CLASS_SEARCH.GBL'
https://my.unlv.nevada.edu/psc/lvporprd/EMPLOYEE/HRMS/c/COMMUNITY_ACCESS.CLASS_SEARCH.GBL
| grep ICSID | grep -oP "value='\K[^']+")

echo $icsidval   ### <<<<< this displays the sys env data..

curl -v  -A  "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11)
Gecko/2009061118 Fedora/3.0.11-1.fc9 Firefox/3.0.11"   --cookie-jar 1aa.lwp
--cookie 1aa.lwp     -d
'ICAJAX=1&ICNAVTYPEDROPDOWN=0&ICType=Panel&ICElementNum=0&ICStateNum=2&ICAction=SSR_CLSRCH_WRK_CAMPUS%240&ICXPos=0&ICYPos=65&ResponsetoDiffFrame=-1&TargetFrameName=None&FacetPath=None&ICFocus=&ICSaveWarningFilter=0&ICChanged=-1&ICAutoSave=0&ICResubmit=0&ICSID="$icsidval"&ICActionPrompt=false&ICBcDomData=undefined&ICFind=&ICAddCount=&ICAPPCLSDATA=&SSR_CLSRCH_WRK_CAMPUS$0=BK'
-e "
https://public.lionpath.psu.edu/psc/CSPRD/EMPLOYEE/HRMS/c/COMMUNITY_ACCESS.CLASS_SEARCH.GBL";
-L "
https://public.lionpath.psu.edu/psc/CSPRD/EMPLOYEE/HRMS/c/COMMUNITY_ACCESS.CLASS_SEARCH.GBL
"

##I attempt to use the icsidval in the above data for the post, but when
the curl is displayed in the verbose, I'm not seeing the expanded var.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to