3 ms·
That's been around since the original Bourne shell; /etc/glob, from what I can see from its source, would refuse to run the command if the resulting expansion t
by Joker_vD 2y ago
That's been around since the original Bourne shell; /etc/glob, from what I can see from its source, would refuse to run the command if the resulting expansion turned out completely empty; and the globs with no matches would be simply removed.
- amelius 2y agoThat's not how it works in recent Ubuntu releases. If there is no match, the command runs with the wildcard chars not substituted. # echo foo*bar foo*bar
- Joker_vD 2y agoYes, this current behaviour was introduced by the original Bourne shell and then it stuck for some silly reason or another (it probably has some fringe use cases but they elude me). Thompson's original shell, or rather, /etc/glob, at various versions implemented the mix of behaviours that would later be reintroduced as nullglob and failglob options in Bash.