This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Run command in new window
- From: Steven Penny <svnpenn at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 27 Dec 2017 16:03:04 -0800 (PST)
- Subject: Re: Run command in new window
- Authentication-results: sourceware.org; auth=none
- References: <096b28f1-2e30-e371-f0b7-e090a24498f5@gmail.com>
On Wed, 27 Dec 2017 17:46:37, cyg Simple wrote:
$ cygstart bash -c \"echo \\\'\; read\"
$ export z="'"
$ bash -c "echo \\${z}; read"
works
$ cygstart bash -c \"echo \\\\${z}\; read\"
this assumes that "z" is something, if you do "z=" then it breaks
$ bash -c 'echo \'; read'
fails to work when I think it should as the \ should cause the '
following it to be ignored by the command line processor.
na, you can never single quote a single quote, it is not possible. you have to
split the string on each single quote, assuming the string has any - then you
single quote the substrings as needed and escape the single delimiting quotes:
$ echo "hello ' world"
+ echo 'hello '\'' world'
it gets more complicated with cygstart because an extra layer of
quoting/escaping is added - I about have a function to automate it - hopefully
will post soon
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple