in reply to Re: Why does system("mv $x $y") not work when it works at the command line?
in thread Why does system("mv $x $y") not work when it works at the command line?

This varies by shell. By default zsh will gripe if it can't find a match (although I think there's options enabled with setopt which will make it behave more like POSIX/ksh). For example the first works (because of course there's a file named foo . . . who doesn't have one?) but the second errors first and doesn't actually run the echo command.

oscar:~ 1064> echo fo[ob] foo oscar:~ 1065> echo fo[xy] zsh: no matches found: fo[xy]

The cake is a lie.
The cake is a lie.
The cake is a lie.