Parsing Cookies in bash cgi scripts -


i trying transfer less of query strings , more of cookies. need make script parses cookies http_cookie request header. format of cookies is:

{cookiename}={cookievalue} {other-cookies}={other-cookie-value} 

my options either set {cookiename} , set value...or scan through full list of cookies , parse bash variable $cookiename equal {cookievalue}

assuming best case scenario, cookies may bash friendly. in case can source cookie file.

. cookies.txt 

and bash save each cookie variable. many tell file not formatted correctly, perhaps having 1 or more of these problems

  • invalid characters in variable name
  • no quotes around values

in case need add using sed before sourcing file.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -