Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #42496
| From | John Gordon <gordon@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: os.system() with imbeded quotes on centos |
| Date | 2013-04-01 20:26 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <kjcqh6$g2n$1@reader1.panix.com> (permalink) |
| References | <0c9717ca-52dd-49ce-8102-e1432883858a@googlegroups.com> |
In <0c9717ca-52dd-49ce-8102-e1432883858a@googlegroups.com> cevyne@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@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
os.system() with imbeded quotes on centos cevyne@gmail.com - 2013-04-01 12:22 -0700
Re: os.system() with imbeded quotes on centos Chris Angelico <rosuav@gmail.com> - 2013-04-02 06:33 +1100
Re: os.system() with imbeded quotes on centos John Gordon <gordon@panix.com> - 2013-04-01 20:26 +0000
Re: os.system() with imbeded quotes on centos Cameron Simpson <cs@zip.com.au> - 2013-04-06 09:00 +1100
Re: os.system() with imbeded quotes on centos Chris Rebert <clp2@rebertia.com> - 2013-04-05 16:36 -0700
csiph-web