in reply to System command using array and pipe
I would use a simpler solution than those presented so far: use system() with a scalar argument and simply quote the path containing a space so that the shell sees it as a single argument.
system("mysqldump --add-drop-table -uroot -ppassword mydatabase | gzip -9c > '/home/username/Ubuntu One/mydatabase.sql.gz'");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: System command using array and pipe
by ikegami (Patriarch) on Jun 04, 2011 at 19:14 UTC | |
by philipbailey (Curate) on Jun 05, 2011 at 09:12 UTC | |
by ikegami (Patriarch) on Jun 06, 2011 at 18:17 UTC | |
by philipbailey (Curate) on Jun 06, 2011 at 20:08 UTC | |
by ikegami (Patriarch) on Jun 06, 2011 at 20:17 UTC |