Re: BASH and wildcard expansion

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

 



Let me try again.  I want to copy a file with a filename like 2013-August-18--1123.zip to another folder.  However, because the last 4 digits of the filename won't always be the same, I want to be able to search in a bash script for '2013-August-18--*.zip'. I.e. match all files with '2013-August-18--' in the filename.  From a console I can do this by:

ls 2013-August-18--*.zip

How can I do that in a bash script.  I can probably use find, but this seems much simpler and/or quicker than finding one file.

Does that make more sense?



On Mon, Aug 19, 2013 at 3:03 PM, Joe Zeff <joe@xxxxxxx> wrote:
On 08/19/2013 11:56 AM, Mark Haney wrote:

# Filename format YYYY_MM_DD--HHMM.zip
filename=$log_year"-"$log_month"-"$log_day"--"/*".zip"

I think that's supposed to be "\*" but ICBW.
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



--
Caesar si viveret, ad remum dareris.

Mark Haney
Software Developer/Consultant
mark.haney@xxxxxxxxx
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux