in reply to Unsuccessfully passing arguments to a bash command

Welcome zapatafa,

Most times when you call a shell, the problem is in the special characters of Perl and of the shell. Try doing this:

my $cmd = qq|[Path]bash -ic ...|; print "$cmd\n"; system($cmd);
Then look for any differences from your command line call. Replace Path with the full path name to get to 'bash'.

Update: Happy-the-monk pointed out my error, thanks.

Regards...Ed

"Well done is better than well said." - Benjamin Franklin

Replies are listed 'Best First'.
Re^2: Unsuccessfully passing arguments to a bash command
by zapatafa (Initiate) on Jun 15, 2013 at 20:22 UTC
    I've tried this. But even if I write
    #!/usr/bin/perl my $cmd = qq|/bin/bash -ic untouchable john mike bill|; print $cmd; system ($cmd);
    The output is
    /bin/bash -ic untouchable john mike billStarting... done!
    Somehow the arguments john mike bill are getting lost.

      Where john mike bill are what?