Bug in /etc/cron.d/mlocate.cron or am I crazy?

Michael Schwendt mschwendt at gmail.com
Sat Nov 28 08:53:47 UTC 2009


On Fri, 27 Nov 2009 23:20:23 -0500, Matthew wrote:

> On Fri, Nov 27, 2009 at 10:55:17PM -0500, Steven W. Orr wrote:
> > I can't believe this is a real bug. I'm submit it to bugzilla. It's in F10, 11
> > and 12. I'd be curious to know just how old this bug is.
> > Contents of mlocate.cron is:
> > #!/bin/sh
> > nodevs=$(< /proc/filesystems awk '$1 == "nodev" { print $2 }')
> [...]
> > Unless I'm going cuckoo, I'm guessing that the intent was for line two to be:
> > nodevs=$(< /proc/filesystems | awk '$1 == "nodev" { print $2 }')
> 
> Have you tried it? The code in the file isn't an error; it's just very
> obscure bash syntax. That is, $(< /some/file ) is obscure, and $(<
> /some/file filter-command ) is *really* obscure. Doesn't seem to be
> documented in the bash manual -- but it works.

See first chapter of topic "REDIRECTION" in bash manual.

> And putting a | in the middle there doesn't.

That would only work as expected when also replacing "<" with "cat".




More information about the users mailing list