
18 Sep
2013
18 Sep
'13
1:04 a.m.
Matthew Cengia <mattcen@gmail.com> writes:
On 2013-09-17 20:42, Russell Coker wrote:
On Tue, 17 Sep 2013, Jason White <jason@jasonjgw.net> wrote:
Matthew Cengia <mattcen@gmail.com> wrote:
mattcen@isis:tmp$ shopt -s nullglob mattcen@isis:tmp$ ls *.mkv *.mp4 *.avi a.mkv b.mp4
Excellent.
Yes, Matthew's suggestion works really well for interactive use. I couldn't work out how to make it run from a Makefile though.
nullglob is a bashism. gmake defaults to SHELL=/bin/sh.
GNU makefiles have a magical $(wildcard *.avi) function that I don't fully understand, but which may do what you want if you do some research into it.
RTFM; gmake $(wildcard) always behave like nullglob is on.