From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 14 Apr 2006 21:24:57 +0400 From: Alexey Tourbin To: ALT Linux Community Message-ID: <20060414172457.GB8508@localhost> Mail-Followup-To: ALT Linux Community References: <443FB1A0.4070003@vzljot.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cmJC7u66zC7hs+87" Content-Disposition: inline In-Reply-To: <443FB1A0.4070003@vzljot.ru> Subject: Re: [Comm] Shell quoting and $* X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.7 Precedence: list Reply-To: ALT Linux Community List-Id: ALT Linux Community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2006 17:25:26 -0000 Archived-At: List-Archive: List-Post: --cmJC7u66zC7hs+87 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 14, 2006 at 06:28:48PM +0400, Vitaly Ostanin wrote: > =FA=C4=D2=C1=D7=D3=D4=D7=D5=CA=D4=C5. > > =F3=CB=C1=D6=C9=D4=C5, =D0=CF=D6=C1=CC=D5=CA=D3=D4=C1, =CB=C1=CB =CD=CF= =D6=CE=CF =D7 shell =D3=CB=D2=C9=D0=D4=C5 =DC=CB=D2=C1=CE=C9=D2=CF=D7=C1=D4= =D8 > =C1=D2=C7=D5=CD=C5=CE=D4=D9 =D0=D2=C9 =D0=C5=D2=C5=C4=C1=DE=C5 =D7 =D0=D2= =CF=C7=D2=C1=CD=CD=C5? =E4=C1, =D7=CF=D0=D2=CF=D3 =D4=D5=D0=CF=CA, =CF=C4= =CE=C1=CB=CF: > > $ touch 'test 1' > $ touch 'test 2' > $ echo 'ls $*' > test.sh ls "$@" > $ chmod +x test.sh > $ ./test1.sh "test 1" "test 2" > ls: test: No such file or directory > ls: 1: No such file or directory > ls: test: No such file or directory > ls: 2: No such file or directory > > =F3=CC=C5=C4=D5=C0=DD=C9=CA =D7=C1=D2=C9=C1=CE=D4 =D3=CB=D2=C9=D0=D4=C1 = =D4=CF=D6=C5 =CE=C5 =D2=C1=C2=CF=D4=C1=C5=D4: > unset $arg > while [ "$1" !=3D "" ]; do > arg=3D"$arg '$1'" > shift > done; > ls $arg for arg; do : "$arg" done > $ ./test.sh "test 1" "test 2" > ls: 'test: No such file or directory > ls: 1': No such file or directory > ls: 'test: No such file or directory > ls: 2': No such file or directory --cmJC7u66zC7hs+87 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFEP9rpfBKgtDjnu0YRAqhuAJ9hXAXhtLKKl/xONMHHczm4fsd15ACfaQmr d3LZYZyB8nipLxZ66WvxNEg= =tlpL -----END PGP SIGNATURE----- --cmJC7u66zC7hs+87--