Is there a method similar to PHP's GET for bash scripts?
This is what I'm trying to do...
PHP file sets a variable and executes a remote bash script, the variable gets passed and is used in the bash script.
So this is my PHP script...
$myvar = 'hello world';
$connection = ssh2_connect('example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
$stream = ssh2_exec($connection, '/usr/incoming/myscript.sh');
As @Phylogenesis commented, you want to simply put the variables after the script call, then call in the bash script use
$1 to read the var:
$stream = "/usr/incoming/myscript.sh " . escapeshellarg($myvar);
Your bash script would look like:
#!/bin/bash echo "$1"