Skip to content

ksh incompatble with echo -ne during $session->getExec(); #56

@GillesCrebassa

Description

@GillesCrebassa

Hi,

I'm connecting to a server AIX using ksh on ssh.

$ssh_remote_script_path= '/home/user_ksh/em/em_os.sh';
$configuration = new Ssh\Configuration('IPAddress');
$authentication = new Ssh\Authentication\Password('user_ksh', 'password');
$session = new Session($configuration, $authentication);
$exec = $session->getExec();
$result = $exec->run($ssh_remote_script_path);

The sript on remote server is /home/<user_ksh>/em/em_os.sh which just identify the server (Linux, AIX, solaris...)

The $result is 'AIX -ne' due to function run(...) in Exec.php which use the command:$cmd .= ';echo -ne "[return_code:$?]"';

Do you think it's possible to change or force the bash or removing the '-ne' when it's ksh ?

Thanks
Gilles

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions