[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shell argument quoting woes
From: |
Rustom Mody |
Subject: |
Re: Shell argument quoting woes |
Date: |
Thu, 25 Jul 2013 09:46:43 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Thursday, July 25, 2013 8:58:51 PM UTC+5:30, Thorsten Jolitz wrote:
> I see, so the problem was actually the string-splitting by spaces and
> not the quoting. Thanks!
Actually ideal would be to split on only 1st space(s).
In languages like python this is possible.
I guess you can do it with a regexp in elisp:
Python 2.7.5+ (default, Jun 2 2013, 21:21:29)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> cmd="prg -'fun \"strg\" num'"
>>> cmd.split(" ", 1)
['prg', '-\'fun "strg" num\'']