From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <443FB1A0.4070003@vzljot.ru> Date: Fri, 14 Apr 2006 18:28:48 +0400 From: Vitaly Ostanin User-Agent: Thunderbird 1.5 (X11/20060323) MIME-Version: 1.0 To: ALT Linux Community X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCF0AA308308B3FC74552E361" X-Virus-Scanned: by amavisd-new at vzljot.ru Subject: [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 14:28:50 -0000 Archived-At: List-Archive: List-Post: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCF0AA308308B3FC74552E361 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable =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 $ 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 $ ./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 --=20 Regards, Vyt mailto: vyt@vzljot.ru JID: vyt@vzljot.ru --------------enigCF0AA308308B3FC74552E361 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEP7GgXQgvvSRg+k4RApB+AJ9L+snX98nzHvz9pfFuU6y09bPrSgCghaTx fMPBtqPJRs67kg6QLgArl1s= =qlgX -----END PGP SIGNATURE----- --------------enigCF0AA308308B3FC74552E361--