[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: turn off word splitting for vars but keep for read
From: |
Eric Blake |
Subject: |
Re: RFC: turn off word splitting for vars but keep for read |
Date: |
Fri, 22 Nov 2013 11:53:53 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 11/22/2013 10:36 AM, Aleksey Midenkov wrote:
> But nevertheless, I still find my proposal usable (since word
> splitting for vars is unlikely to be usable in scripts).
Scripts use word splitting on variables ALL the time. For example, I
bet you have (multiple copies of) a script named install-sh somewhere on
your system. It frequently uses word split variables, such as these
setup lines:
rmprog=${RMPROG-rm}
...
rmcmd="$rmprog -f"
for use in constructs like this:
$doit $rmcmd -f "$dst" 2>/dev/null ||
Disabling word splitting for an interactive shell is one thing (and in
fact, zsh has done that in their default mode), but for scripting, you
would break LOTS of existing scripts if you changed the default behavior
of word splitting.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- RFC: turn off word splitting for vars but keep for read, Aleksey Midenkov, 2013/11/22
- Re: RFC: turn off word splitting for vars but keep for read, Pierre Gaston, 2013/11/22
- Re: RFC: turn off word splitting for vars but keep for read, Aleksey Midenkov, 2013/11/22
- Re: RFC: turn off word splitting for vars but keep for read,
Eric Blake <=
- Re: RFC: turn off word splitting for vars but keep for read, Pierre Gaston, 2013/11/22
- Re: RFC: turn off word splitting for vars but keep for read, Aleksey Midenkov, 2013/11/22
- Re: RFC: turn off word splitting for vars but keep for read, Bob Proulx, 2013/11/24
- Re: RFC: turn off word splitting for vars but keep for read, Greg Wooledge, 2013/11/25
- Re: RFC: turn off word splitting for vars but keep for read, Bob Proulx, 2013/11/25
- Re: RFC: turn off word splitting for vars but keep for read, Eduardo A . Bustamante López, 2013/11/22
Re: RFC: turn off word splitting for vars but keep for read, Greg Wooledge, 2013/11/22
Re: RFC: turn off word splitting for vars but keep for read, Peggy Russell, 2013/11/22