os.system() with imbeded quotes on centos
John Gordon
gordon at panix.com
Mon Apr 1 16:26:14 EDT 2013
In <0c9717ca-52dd-49ce-8102-e1432883858a at googlegroups.com> cevyne at gmail.com writes:
> someip = '192.168.01.01'
> var1 = 'lynx -dump http://' + someip + '/cgi-bin/xxxx.log&.submit=+++Go%21+++ > junk'
'&' is a special character in shell commands. You'll need to quote or
escape it.
Try this:
someip = '192.168.01.01'
var1 = 'lynx -dump "http://' + someip + '/cgi-bin/xxxx.log&.submit=+++Go%21+++" > junk'
Note the extra pair of double-quotes around the http:// part.
--
John Gordon A is for Amy, who fell down the stairs
gordon at panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
More information about the Python-list
mailing list