Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Splitting up quoted/escaped command line arguments

by Tommy (Chaplain)
on Feb 11, 2014 at 19:31 UTC ( #1074485=note: print w/replies, xml ) Need Help??


in reply to Re^2: Splitting up quoted/escaped command line arguments
in thread Splitting up quoted/escaped command line arguments

OK. This mixture of approaches seems to be working so far: I haven't been able to break it yet. Can anyone break this?

(Please see UPDATE 2 to the OP)

Tommy
A mistake can be valuable or costly, depending on how faithfully you pursue correction
  • Comment on Re^3: Splitting up quoted/escaped command line arguments

Replies are listed 'Best First'.
Re^4: Splitting up quoted/escaped command line arguments
by choroba (Bishop) on Feb 11, 2014 at 20:46 UTC
    'a'\''b' Seems to break update 4.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      That's ok with me, because in Linux-ese (bash/sh/ksh), you can't escape a single quote. It's one of the most annoying things and I find it reeeally bothersome. This is why I don't try to accommodate for a "\'" sequence in update 4. Despite the fact that I don't want these commands to go to the shell, they are being written by people who deal with the shell almost exclusively: system admins. This much I can assume: that they won't be putting in commands that have syntax which outright fails to run on its own.

      Tommy
      A mistake can be valuable or costly, depending on how faithfully you pursue correction
        Yes, you can escape a single quote - outside single quotes.
        $ echo 'a'\''b' a'b
        لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1074485]
help
Chatterbox?
LanX vile place ...
[LanX]: well, me was kidding!
[marto]: One of the main train stations is right across the road, so handy from that perspective, and there are some nice hotels in the area, but it's not great after dark, or sometimes during the day to be honest
[LanX]: not easy to find good and affordable venues ...
[marto]: hmm, there are several universities and colleges handy that I'd have thought would offer such services, given this is out of term time, I've no experience of paying for venues :)
[LanX]: OK ...
[LanX]: I have no idea how Mark scouted, giving that he lives in London ... but I think he mentioned his wife being Scottish
[marto]: ah, so this is payback :P
[LanX]: problem with booking venues is that you only know the number of participants a week in advance. ..

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2017-12-14 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (396 votes). Check out past polls.

    Notices?