From: Jano Svitok Date: 2007-08-21T07:18:49+09:00 Subject: Re: system() doesn't work but %x does On 8/21/07, Philip Mateescu wrote: > > I'm trying to issue an "svn add" command from a script to add everything > under the current folder to subversion. > Command line works: > # svn add --force * > > %x / backticks work > out = %x[svn add --force *] > > system() does not. > system('svn', 'add', '--force', '*') produces "svn: warning: '*' not > found" > > I suspect there is some subtlety in regard to the expansion of the "*"; > is there any way of making it work with system()? I guess '*' is handled by the shell. `` invokes the command via shell, while system does it directly (and you have to expand * yourself). So, there are two possibilities: 1. invoke /bin/sh (or whatever shell are you using) with arguments to call svn add... 2. expand it yourself (Dir.glob might be helpful) NB: I'm curious: why do you insist on system()?