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
- From: Rich Freeman <r-plug@thefreemanclan.net>
- To: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org>
- Subject: Re: [PLUG] Need some script advice
- Date: 2012年3月13日 14:28:09 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=nQUdBSzOJ4oQ1hSg1/lAYZg8ebl+Bvd8iF2YQ4u5jzw=; b=SYbhOMCUw4CFpY+Ah9ZKyQQ36csgCrut8rhBF7Cx/fw02P4boz0vgX9znW6+gTSkBN xFK9koT3J0abexDSviTmwfer/DLv+dObPOz6hA+7oh1BvghJIlRX87mUoz8XgJqB1Uj5 Yv8gBxRiN8NBcucwWB1nReUFCKxkU3/nhXsSQXYq2fqMIYu4mpfoQ7Aa+hOgUW8nwndH rrE4LJdVTAVvz1GTlYz8GziO5A/8w3mJd9H8kry79YDNRVCeKaj5SVj6UOEmsyFQkE8x JzE+FCVq1EyJsmYx0g7kNHSsRv2pvvKSRU95rRSaJ/vGoelLVOsv9CWHXgbFQvhWFVm5 rWiw==
- Reply-to: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
- Sender: plug-bounces@lists.phillylinux.org
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