Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: shell script cgi (summary?)

From: Philip Rowlands <phr(at)doc.ic.ac.uk>
Date: Tue Nov 19 2002 - 14:42:43 EST


On Tue, 19 Nov 2002, Brian Fury wrote:

>> ua=`echo "$HTTP_USER_AGENT" | sed "s#\;##g"`

Well yes, if you run it directly. The initial question was about variable assignment.

Your example in context:

$ cat cgiscript
ua=`echo "$HTTP_USER_AGENT" | sed "s#\;##g"` $ export HTTP_USER_AGENT=""whoami""""
$ sh -x ./cgiscript

++ echo whoami
++ sed 's#\;##g'
+ ua=whoami

All those quotes around ""whoami"""" cancel out, BTW. The shell sees: <export><SP><LAME><=><""><whoami><""><"">

Cheers,

Phil Received on Wed Nov 20 06:18:43 2002

Do you need help?X

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:37 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library