[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Double quotes embedded in a string ...

Stefan Lang

7/28/2006 3:45:00 PM

Here is something that I am struggling with -- I would like to execute a
command string with an IO.popen call that contains embedded double quote
characters. When I build the initial command string everything seems to
work, but once I pass is on to IO.popen, it seems to mess up the double
quotes.

Here is my example, I want to execute the following command from a Ruby
program:

pppd connect "chat -v '' ATZ OK ATDT5551234 CONNECT '' ogin:
username word: password" /dev/ttyS0 115200 -detach crtscts modem defaultroute

I create the command string by the long and somewhat ugly ruby command:

command = "pppd connect \\\"chat -v '' #{initialization_command}
#{initialization_response} #{dial_command} #{dial_response} ''
#{username_prompt} #{username} #{password_prompt} #{password}\\\"
#{device.name} #{speed} -detach crtscts modem defaultroute\r\n"

In this case, I escaped the escaped the double quote. I have also tried
various combinations of multiple double quotes (4 in a row, etc.).

If I now echo the command using a system call:

system( "echo #{command}" )

the command seems to echo the desired result:

pppd connect "chat -v ATZ OK ATD5551234 CONNECT ogin: username
word: password" /dev/ttyS0 115200 -detach crtscts modem defaultroute

But when I pass it to IO.popen, I get

pppd: unrecognized option '-v'
pppd version 2.4.1
Usage: pppd [ options ], where options are:
<device> Communicate over the named device
<speed> Set the baud rate to <speed>
<loc>:<rem> Set the local and/or remote interface IP
addresses. Either one may be omitted.
asyncmap <n> Set the desired async map to hex <n>
auth Require authentication from peer
connect <p> Invoke shell command <p> to set up the
serial line
crtscts Use hardware RTS/CTS flow control
defaultroute Add default route through interface
file <f> Take options from file <f>
modem Use modem control lines
mru <n> Set MRU value to <n> for negotiation
See pppd(8) for more options.

which is caused by that the double quotes are being stripped by
IO.popen. How do I avoid this?

Thanks,
Dale Martenson
--
Posted with http://De.... Sign up and save your mailbox.

5 Answers

Ara.T.Howard

7/28/2006 4:08:00 PM

0

Ted

7/18/2009 7:18:00 PM

0


"suebrd" <suebrd@aol.com> wrote in message
news:f5527075-27f7-4416-aca2-0adb5f06416f@u38g2000pro.googlegroups.com...
On Jul 17, 2:17 pm, "Lee" <4gi...@innocent.com> wrote:

Well, check it out Lee. Ted/Ellie (they're interchangeable) are now
accusing Wayne of killing a guy via assisted suicide to get his
property and peddling his wife's ass. You can sort of see why Wayne
figures they were only there for the Humboldt (CA's best pot). So
pedophilia against a guy they've never known--Ellen/Deb were accusing
John of having a small weenie when I signed in again, is rather small
potatoes, imo. If they'd ever actually hung out with him, they'd be
accusing him of murdering his still born child or something.
------------
None of us has accused Wayne of killing a guy suebrd. Maybe you better take
a reading comprehension course, but of course that won't have any effect on
your need to twist and put words in another's mouth. You are the one keeping
your phony accusation alive here by posting it over and over. You are doing
Wayne no favors suebrd, but hey those that know you are well aware that you
care little for honesty if it gets in the way of your story.






> "suebrd" <sue...@aol.com> wrote...
>
> On Jul 17, 7:57 am, deb <dwal...@tx.rr.com> wrote:
>
> > The emperor has no clothes. I won?t be your Sergeant, it?s a phony
> > job, I'd rather be a true friend. EOTS was quite a game and you fell
> > for your own game. You can not hold even one apart, including you.
> > Either you?ll stand up or you?ll ride off into the sunset protecting
> > the lie. There?s no unsubs to hide behind here. It?s up to you.
>
> ::: LOL!!! That was a coffee splatter!!! No, you're Ted's gun mall now,
> Harshie. Gonna take on the Big Guy. lol. You can't even admit to
> yourself Ted was Cletus playing a cheap (continuing) game. The
> Emperor has no clothes indeed. Stories are interesting.
> ____________
>
> Hi Sue, I suppose it should be noted for the record
> that Ted Miner has revived the 'pedophilia tactic' that
> he first used while posting as Cletus, in order to run
> John Lopez off this list. With all the talk about one
> person "running so and so off the list," I can think
> of no other tactic as low or as blatant as this one that
> has ever been used to that effect. I don't recall that
> even Katie ever stooped so low as to fabricate direct
> allegations of pedophilia against her targets here.
>
> Are you able to see Ted more clearly as a result of
> his romp and spin routine here this time around,
> I wonder? I see a profoundly dishonest, manipulative
> and patently conniving old "gamer", in almost every
> post of his that I've reviewed -- going back to 2003.
> But even more so this past 2 years, when his whole
> participation here has revolved around smears, sneers,
> innuendo and blatant lies. He checks his morals at
> the door in order to pursue his agenda, each time he
> shows up in this n.g. (presuming that he concerns
> himself with ethical restraints, elsewhere ;).
>
> He's what I call a dishonest player. ;)
>
> Ah well.. open newsgroups. Such a bounty of startling
> gifts and shocking goons. Be well, you.
>
> ~ Lee


Ted

7/18/2009 7:20:00 PM

0


"suebrd" <suebrd@aol.com> wrote in message
news:3c86c2f7-432b-4d7e-9b9e-468741fc2f29@y10g2000prf.googlegroups.com...
On Jul 17, 6:46 pm, ellie <miraclelur...@yahoo.com> wrote:
> On Jul 17, 2:33 pm, suebrd <sue...@aol.com> wrote:
>
> > On Jul 17, 2:17 pm, "Lee" <4gi...@innocent.com> wrote:
>
> > Well, check it out Lee. Ted/Ellie (they're interchangeable) are now
> > accusing Wayne of killing a guy via assisted suicide to get his
> > property and peddling his wife's ass. You can sort of see why Wayne
> > figures they were only there for the Humboldt (CA's best pot). So
> > pedophilia against a guy they've never known--Ellen/Deb were accusing
> > John of having a small weenie when I signed in again, is rather small
> > potatoes, imo. If they'd ever actually hung out with him, they'd be
> > accusing him of murdering his still born child or something.
>
> This is a perfect example of your lies Sue. I would be very careful
> if I were you. No one has accused Wayne of killing anyone. I happen
> to agree with assisted suicide when there is a great deal of
> suffering.

I would be very careful? you insinuated that Wayne offed that guy for
his property and Ted claims he sells Kaye's ass for profit. Sick fucks
--------------

Read her post suebrd, not just what you want to think it said. It is you
that is posting this and no one else. You dishonest old crone.


Ted

7/18/2009 7:22:00 PM

0


"suebrd" <suebrd@aol.com> wrote in message
news:c0234ac0-7bf5-4602-b56f-76de61db4054@x25g2000prf.googlegroups.com...
On Jul 18, 1:29 am, suebrd <sue...@aol.com> wrote:
> On Jul 18, 1:11 am, ellie <miraclelur...@yahoo.com> wrote:
>
>
>
> > On Jul 18, 1:03 am, suebrd <sue...@aol.com> wrote:
>
> > > On Jul 17, 6:46 pm, ellie <miraclelur...@yahoo.com> wrote:
>
> > > > On Jul 17, 2:33 pm, suebrd <sue...@aol.com> wrote:
>
> > > > > On Jul 17, 2:17 pm, "Lee" <4gi...@innocent.com> wrote:
>
> > > > > Well, check it out Lee. Ted/Ellie (they're interchangeable) are
> > > > > now
> > > > > accusing Wayne of killing a guy via assisted suicide to get his
> > > > > property and peddling his wife's ass. You can sort of see why
> > > > > Wayne
> > > > > figures they were only there for the Humboldt (CA's best pot). So
> > > > > pedophilia against a guy they've never known--Ellen/Deb were
> > > > > accusing
> > > > > John of having a small weenie when I signed in again, is rather
> > > > > small
> > > > > potatoes, imo. If they'd ever actually hung out with him, they'd
> > > > > be
> > > > > accusing him of murdering his still born child or something.
>
> > > > This is a perfect example of your lies Sue. I would be very careful
> > > > if I were you. No one has accused Wayne of killing anyone. I happen
> > > > to agree with assisted suicide when there is a great deal of
> > > > suffering.
>
> > > I would be very careful? you insinuated that Wayne offed that guy for
> > > his property and Ted claims he sells Kaye's ass for profit. Sick fucks
>
> > I insinuated no such thing. If you're looking for a sick fuck look no
> > farther than your own mind.
>
> oh really, lawsuits, houses, property, you heard it was suicide was it
> assisted? and Ted claims Wayne sells Kaye's ass for profit. Nice
> vacations you guys have in Wisconsin. not to mention John Lopez is a
> pedophile and big brained and has a tiny weeny, according to your sick
> minds...so thats a reason to pick on him. Disgusting.

reposting it here:

Speaking of leeches I have some questions....
What happened to the house that very sick depressed man built for
you? Did you get to keep it? How bout his house that D&J were living
in? I know it was sold so did they have to move out? What about his
share of the family business? Did he leave that to you too? Or is
that one of the things the family was fighting for in their court
battle with you and your wife? I heard his death was a suicide? Was
it assisted? And why did Susan (your housekeeper, babysitter and most
devoted devotee) disappear ... never wanting anything to do with you
again? What set her to flee?

----------

Maybe you should ask Wayne to answer Ellie's questions suebrd. You would be
best served to stay out of what you know not of.


Ted

7/18/2009 7:23:00 PM

0


"suebrd" <suebrd@aol.com> wrote in message
news:ec8e1c3b-c095-4a09-adf0-eafb6a37c880@u16g2000pru.googlegroups.com...
On Jul 17, 2:41 pm, MikeRyder <n...@nospam.com> wrote:
> On Fri, 17 Jul 2009 15:17:17 -0600, "Lee" <4gi...@innocent.com> wrote:
> >"suebrd" <sue...@aol.com> wrote...
> >On Jul 17, 7:57 am, deb <dwal...@tx.rr.com> wrote:
>
> >> The emperor has no clothes. I won?t be your Sergeant, it?s a phony
> >> job, I'd rather be a true friend. EOTS was quite a game and you fell
> >> for your own game. You can not hold even one apart, including you.
> >> Either you?ll stand up or you?ll ride off into the sunset protecting
> >> the lie. There?s no unsubs to hide behind here. It?s up to you.
>
> >::: LOL!!! That was a coffee splatter!!! No, you're Ted's gun mall now,
> >Harshie. Gonna take on the Big Guy. lol. You can't even admit to
> >yourself Ted was Cletus playing a cheap (continuing) game. The
> >Emperor has no clothes indeed. Stories are interesting.
> >____________
>
> >Hi Sue, I suppose it should be noted for the record
> >that Ted Miner has revived the 'pedophilia tactic' that
> >he first used while posting as Cletus, in order to run
> >John Lopez off this list.
>
> And it's interesting to note that lopez ran.
>
> >With all the talk about one
> >person "running so and so off the list," I can think
> >of no other tactic as low or as blatant as this one that
> >has ever been used to that effect. I don't recall that
> >even Katie ever stooped so low as to fabricate direct
> >allegations of pedophilia against her targets here.
>
> I see you want to continue with your fake outrage, flynn. It's
> interesting that such a self-perceived 'holy man' with 'senior
> experience' would stopp to such a manipulative tactic.
>
>
>
> >Are you able to see Ted more clearly as a result of
> >his romp and spin routine here this time around,
> >I wonder? I see a profoundly dishonest, manipulative
> >and patently conniving old "gamer", in almost every
> >post of his that I've reviewed -- going back to 2003.
>
> Obviously you're looking at yourself. Well, that's at least a first
> step for you.
>
> >But even more so this past 2 years, when his whole
> >participation here has revolved around smears, sneers,
> >innuendo and blatant lies.
>
> You mean like you're doing?
>
> >He checks his morals at
> >the door in order to pursue his agenda, each time he
> >shows up in this n.g. (presuming that he concerns
> >himself with ethical restraints, elsewhere ;).
>
> >He's what I call a dishonest player. ;)
>
> And you're an honest player? LOL
>
>
>
> >Ah well.. open newsgroups. Such a bounty of startling
> >gifts and shocking goons.
>
> Take an honest look for once at your own activities in this newsgroup,
> flynn. When you've cleaned up your own act, then you can come back and
> deliver your 'holy' lectures.
>
>
>
> >~ Lee
>
>

What activities would that be, Mike? Exposing Ted as Cletus? Do
tell, you read this stuff...do you really think Wayne sells his wife's
ass for profit and offed a suicidal guy to get his property? And as a
minor point, I'm the sleazeball from hell? Is that how far you will
actually turn to throw your lot in with? The bitch that didn't even
give enough a damn to answer you back when you first told her of your
heart disease? I don't think so, but hey if so, so be it. I'd
prefer an answer tho.

------------

You are really twisting in your viciousness now suebrd.