Re: bash - safely pass untrusted strings?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Feb 26, 2008 at 03:30:02PM -0800, Benjamin Smith alleged:
> File script3.sh contains the following: 
> $ cat script3.sh
> #! /bin/sh
> for file in $*
>         do
>         ls -l "$file";
>         done

Use "$@" instead of $*.  It will split up the way you want.



Attachment: pgppMwA0O14rJ.pgp
Description: PGP signature

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux