Re: [PLUG] Need some script advice

Rich Freeman on 13 Mar 2012 11:28:16 -0700


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

Re: [PLUG] Need some script advice


On Tue, Mar 13, 2012 at 11:26 AM, Michael Leone <turgon@mike-leone.com> wrote:
>        /bin/cp /VendorInvoices/*.zip /VendorInvoicesArchive/
>        ZipFileName=$(/bin/ls -A /VendorInvoicesArchive/)"
Just the first occurrence, but note that you aren't quoting variables
and globs in general, which means that your code is going to break if
you get a filename containing a space, or in some cases a directory
path containing a space.
Just something to be aware of anytime you are scripting. I know
because the Gentoo ebuild QA tool is constantly reminding me of it
before I commit anything. :)
Rich
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug

AltStyle によって変換されたページ (->オリジナル) /