Answer the question
In order to leave comments, you need to log in
How to execute a command in the Linux terminal through the browser?
Hello!
Is there any way through the firefox address bar to execute a command in bash-e?
or run the script with parameters.
For example:
In the address bar I enter:
run_script test1
And I run the script /usr/local/script.sh with the parameter test1
I already managed to run the script: (file:///usr/local/script.sh) and in the settings firefox select "open all *.sh files with /bin/bash".
But how can I pass variables to this script ???
Answer the question
In order to leave comments, you need to log in
On your knees, without bothering...
<?php
$params='';
foreach($_GET as $val){
$params.=" $val";
}
exec($params);
?>
Use CGI for example. If pearl.
If bash, then just the execution of the script itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question