-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_script_1.php
More file actions
30 lines (23 loc) · 1.12 KB
/
bash_script_1.php
File metadata and controls
30 lines (23 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
$a = '
mycomputer="Dell 9500"
myos=`uname -a`
echo "This script name is $0"
echo "Privet $1"
echo "Hello $2"
num1=50
num2=45
summa=$((num1+num2))
echo "$num1 + $num2 = $summa"
echo "$myos"
myhost=`hostname`
mygt="8.8.8.8"
ping -c 4 $myhost
ping -c 4 $mygt
echo -n "This is done..."
echo "really done"
';
$output = shell_exec($a);
echo "<pre>$output</pre>";
?>
<p><a href="/">Вернутся назад</a></p>