[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] avoiding shell variable expansion
From: |
Dmitry Alexandrov |
Subject: |
Re: [Help-bash] avoiding shell variable expansion |
Date: |
Fri, 04 Oct 2019 06:43:18 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Andy Chu <address@hidden> wrote:
> On Thu, Oct 3, 2019 at 3:07 PM Greg Silverman <address@hidden>
> wrote:
>> In Python one can spawn a child process and avoid bash expanding command
>> line arguments, e.g.
>>
>> //file: ls.py import subprocess proc =
>> subprocess.Popen(['/bin/ls','*'],shell=False)
>
> Simplest way:
> $ mycmd=(ls '*')
> $ "${mycmd[@]}"
> ls: cannot access '*': No such file or directory
Why the array? ¿Is not this exactly the same as:
$ ls '*'
signature.asc
Description: PGP signature
- [Help-bash] avoiding shell variable expansion, Greg Silverman, 2019/10/03
- Re: [Help-bash] avoiding shell variable expansion, Andy Chu, 2019/10/03
- Re: [Help-bash] avoiding shell variable expansion,
Dmitry Alexandrov <=
- Re: [Help-bash] avoiding shell variable expansion, Eli Schwartz, 2019/10/04
- Re: [Help-bash] avoiding shell variable expansion, Andy Chu, 2019/10/04
- Re: [Help-bash] avoiding shell variable expansion, Andy Chu, 2019/10/04
- Re: [Help-bash] avoiding shell variable expansion, Dmitry Alexandrov, 2019/10/04
- Re: [Help-bash] avoiding shell variable expansion, Andy Chu, 2019/10/04
- Re: [Help-bash] avoiding shell variable expansion, Eli Schwartz, 2019/10/04
Re: [Help-bash] avoiding shell variable expansion, Eli Schwartz, 2019/10/04
Re: [Help-bash] avoiding shell variable expansion, Andreas Kusalananda Kähäri, 2019/10/04
Re: [Help-bash] avoiding shell variable expansion, Stephane Chazelas, 2019/10/04
Re: [Help-bash] avoiding shell variable expansion, Stephane Chazelas, 2019/10/04