in reply to Running Multiple Commands using System

Please show the code that reproduces this problem, and see How do I post a question effectively?

Also, take a look at IPC::System::Simple, IPC::Run, and/or IPC::Run3 for easier calling of system commands. Those modules will be of more help in error cases (especially IPC::System::Simple), and also make avoiding the shell and parameter passing easier.

  • Comment on Re: Running Multiple Commands using System

Replies are listed 'Best First'.
Re^2: Running Multiple Commands using System
by dkhoriya (Initiate) on Jul 02, 2014 at 06:49 UTC
    #!/usr/local/bin/perl use strict; use warnings; system("sdb -d root on 'sdb -d shell; cd /opt; ls';bash ");
    gives error of "root does not take more than one arguement" while the following system call runs fine.
    system("sdb -d shell 'cd /opt; ls';bash ");
    and running independently
    system("sdb -d root on");
    also works fine.