Re: Die üblichen Übungen

<?php
session_start ();
?>

<form method="POST" action="./mysql20240229.php">
<input type="text" name="mysql2024022901"></input>
<input type="submit"></input>
</form>

<?php
echo session_id () . "<br>n";

setcookie ("mysql2024022902", "Hallo, ich bin Cookie 1", time () + 3600);

echo htmlentities (\$_POST ["mysql2024022901"]) . "<br>n";
echo htmlentities (\$_COOKIE ["mysql2024022902"]) . "<br>n";
echo htmlentities (\$_COOKIE ["mysql2024022903"]) . "<br>n";

session_destroy ();
?>

Image Screenshot_20240229_184308

Richtig heisst es so

<?php
session_start ();
?>

<form method="POST" action="./form20240229.php">
<input type="text" name="form2024022901"></input>
<input type="submit"></input>
</form>

<?php
echo session_id () . "<br>n";

setcookie ("form2024022902", "Hallo, ich bin Cookie 1", time () + 3600);

echo htmlentities (\$_POST ["form2024022901"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form2024022902"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form2024022903"]) . "<br>n";

session_destroy ();
?>

POST http://localhost/mysql20240217/20240229/form20240229.php HTTP/1.1
host: localhost
Cookie: form2024022903=Hallo, dies ist Cookie 2
Content-Type: application/x-www-form-urlencoded
Content-Length: 30

form2024022901=Dies ist Data 1

[code]
Trying ::1...
Connected to localhost.
Escape character is '\^]'.
HTTP/1.1 200 OK
Date: Thu, 29 Feb 2024 18:01:24 GMT
Server: Apache/2.4.57 (Debian)
Set-Cookie: PHPSESSID=d51gmeslpsu299hlmlb3g2uacu; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: form2024022902=Hallo%2C%20ich%20bin%20Cookie%201; expires=Thu, 29 Feb 2024 19:01:24 GMT; Max-Age=3600
Vary: Accept-Encoding
Content-Length: 224
Content-Type: text/html; charset=UTF-8


<form method="POST" action="./form20240229.php">
<input type="text" name="form2024022901"></input>
<input type="submit"></input>
</form>

d51gmeslpsu299hlmlb3g2uacu<br>
Dies ist Data 1<br>
<br>
Hallo, dies ist Cookie 2<br>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE mysql20240229" . session_id ();
\$db->query (\$sql);

\$sql = "USE mysql20240229" . session_id ();
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER);";
\$db->query (\$sql);

\$sql = "CREATE TABLE b (y1 INTEGER, y2 INTEGER);";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (0, 0);";
\$sql .= "INSERT INTO a (x1, x2) VALUES (0, 1);";
\$sql .= "INSERT INTO a (x1, x2) VALUES (1, 0);";
\$sql .= "INSERT INTO a (x1, x2) VALUES (1, 1);";
\$sql .= "INSERT INTO a (x1, x2) VALUES (2, 7);";
\$sql .= "INSERT INTO b (y1, y2) VALUES (0, 0);";
\$sql .= "INSERT INTO b (y1, y2) VALUES (1, 1);";
\$sql .= "INSERT INTO b (y1, y2) VALUES (2, 7);";
\$db->query (\$sql);

\$sql = "SELECT x1, x2 FROM a;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . "<br>n";
echo "<br>n";

\$sql = "SELECT y1, y2 FROM b;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . "<br>n";
echo "<br>n";

\$sql = "SELECT x1, x2, y1, y2 FROM a LEFT JOIN b ON a.x1 = b.y1";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . ", " . \$row [2] . ", " . \$row [3] . "<br>n";
echo "<br>n";


\$sql = "DROP DATABASE mysql20240229" . session_id ();
\$db->query (\$sql);

session_destroy ();
?>

0, 0<br>
0, 1<br>
1, 0<br>
1, 1<br>
2, 7<br>
<br>
0, 0<br>
1, 1<br>
2, 7<br>
<br>
0, 0, 0, 0<br>
0, 1, 0, 0<br>
1, 0, 1, 1<br>
1, 1, 1, 1<br>
2, 7, 2, 7<br>
<br>

<?php
session_start ();
include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240229" . session_id ();
\$db->query (\$sql);

\$sql = "USE q20240229" . session_id ();
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER);";
\$db->query (\$sql);

\$sql = "CREATE TABLE b (x INTEGER);";
\$db->query (\$sql);

\$sql = "CREATE TABLE c (x INTEGER);";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
    \$sql = "INSERT INTO a (x) VALUES ("" . rand () % 32 . "");";
    \$db->query (\$sql);
    \$sql = "INSERT INTO b (x) VALUES ("" . rand () % 28 . "");";
    \$db->query (\$sql);
    \$sql = "INSERT INTO c (x) VALUES ("" . rand () % 64  . "");";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM b
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM c) x
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";


\$sql = "DROP DATABASE q20240229" . session_id ();
\$db->query (\$sql);

session_destroy ();
?>

19, 20, 24, 29, 10, 22, 11, 9, 12, 30, 2, 7, 3, 8, 15, 18, 21, 17, 25, 0, 14, 6, 13, 4, 23, 16, 27, 26, <br>
19, 20, 24, 29, 10, 22, 11, 9, 12, 30, 2, 7, 3, 8, 15, 18, 21, 17, 25, 28, 32, 50, 49, 51, 36, 46, 33, 52, 37, 47, 44, 23, 42, <br>
24, 0, 14, 6, 13, 4, 9, 2, 15, 23, 17, 7, 16, 18, 20, 22, 27, 26, 28, 32, 50, 49, 51, 36, 21, 46, 19, 33, 52, 37, 47, 44, 42, <br>
20, 24, 22, 9, 2, 7, 15, 18, 17, <br>
19, 20, 24, 22, 7, 15, 21, <br>
24, 15, 23, 7, 20, 22, <br>
19, 20, 24, 22, 7, 15, 21, 23, <br>
19, 20, 24, 22, 7, 15, 21, 23, <br>
20, 24, 22, 9, 2, 7, 15, 18, 17, 23, <br>
20, 24, 22, 9, 2, 7, 15, 18, 17, 28, 32, 50, 49, 51, 36, 21, 46, 19, 33, 52, 37, 47, 44, 23, 42, <br>
24, 9, 2, 15, 17, 7, 18, 20, 22, 21, 19, <br>
24, 9, 2, 15, 17, 7, 18, 20, 22, 21, 19, <br>

#!/bin/bash

echo "Hallo Welt"

if [[ "\$1" == "David" \&amp;\&amp; "\$2" == "Vajda" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "David Vajda" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "David" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [[ "\$1" == "Vajda" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [ -n "\$1" ]
then
    echo "Das bin nicht ich"
elif [ -z "\$1" ]
then
    i=0
    while [ \$i -lt 10 ]
    do
        echo "Hallo zum \$((\$i+1))."
        i=\$((\$i+1))
    done

    a=(Dies ist ein Array)
    a+=(Und dies ist an das Array angehaengt)

    for s in "\${a[@]}"
    do
        echo "\$s"
    done

    i=0
    while [ \$i -lt 11 ]
    do
        echo "\${a[\$i]}"
        i=\$((\$i+1))
    done

    l=\$(ls)
    for s in \$l
    do
        echo "\$s"
    done
fi

#!/bin/bash

/bin/bash hello.sh
/bin/bash hello.sh "David" "Vajda"
/bin/bash hello.sh "David Vajda"
/bin/bash hello.sh "David"
/bin/bash hello.sh "Vajda"
/bin/bash hello.sh "Max Mustermann"

Hallo Welt
Hallo zum 1.
Hallo zum 2.
Hallo zum 3.
Hallo zum 4.
Hallo zum 5.
Hallo zum 6.
Hallo zum 7.
Hallo zum 8.
Hallo zum 9.
Hallo zum 10.
Dies
ist
ein
Array
Und
dies
ist
an
das
Array
angehaengt
Dies
ist
ein
Array
Und
dies
ist
an
das
Array
angehaengt
helloexec.sh
hello.out
hello.sh
Hallo Welt
Das bin ich
Hallo Welt
Das bin ich
Hallo Welt
Das koennte ich sein
Hallo Welt
Das koennte ich sein
Hallo Welt
Das bin nicht ich

Image 20240229_200547

1.) Rechne die Zahl in binaer Darstellung  in eine Dezimale Darstellung um
1101001100000011b 54019d
2.) Rechne die Zahl in dezimal darstellung in eine Binaerdarstellung um
29809 0111010001110001
3.) Addiere die drei Zahlen schriftlich
            61770
+           31999
+           49088
-----------------
           142857
4.) Subtrahiere die letzten drei Zahlen schriftlich von der ersten schriftlich
            28813
-           12006
-            4529
-            6985
-----------------
             5293
5.) Rechne die Zahl ins zweier komplement um, mit 8 Bit - und subtrahiere diese zahl von der ersten und rechne das Ergebnis nach dezimal
85 -91 = -6
01010101 10100101 = 11111010
6.) Multipliziere die zwei Zahlen schriftlich
14750*6769 = 99842750
7.) Dividiere die zwei Zahlen schriftlich
62739/43447 = 1
8.) Errechne x Logarithmisch mit dem Taschenrechner
24728\^x = 1753828970

Image 20240229_201825

Image 20240229_203134

Image Screenshot_20240302_151947

<?php
session_start ();
?>

<form method="POST" action="./form20240302.php">
<input type="text" name="form2024030201"></input>
<input type="submit">
</form>

<?php
echo session_id () . "<br>n";

setcookie ("form2024030202", "Hallo, ich bin Cookie 1", time () + 3600);

echo htmlentities (\$_POST ["form2024030201"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form2024030202"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form2024030203"]) . "<br>n";

session_destroy ();
?>

POST http://localhost/mysql20240217/20240302/form20240302.php HTTP/1.1
host: localhost
Cookie: form2024030203=Hallo, ich bin Cookie 2
Content-Type: application/x-www-form-urlencoded
Content-Length: 37

form2024030201=Hallo, ich bin Datum 1

Trying ::1...
Connected to localhost.
Escape character is '\^]'.
HTTP/1.1 200 OK
Date: Sat, 02 Mar 2024 14:24:27 GMT
Server: Apache/2.4.57 (Debian)
Set-Cookie: PHPSESSID=v3t3ka4qj26smdeoolrsb7k354; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: form2024030202=Hallo%2C%20ich%20bin%20Cookie%201; expires=Sat, 02 Mar 2024 15:24:27 GMT; Max-Age=3600
Vary: Accept-Encoding
Content-Length: 222
Content-Type: text/html; charset=UTF-8


<form method="POST" action="./form20240302.php">
<input type="text" name="form2024030201"></input>
<input type="submit">
</form>

v3t3ka4qj26smdeoolrsb7k354<br>
Hallo, ich bin Datum 1<br>
<br>
Hallo, ich bin Cookie 2<br>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE mysql20240302" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE mysql20240302" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); ";
\$db->query (\$sql);

\$sql = "CREATE TABLE b (y1 INTEGER, y2 INTEGER); ";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (0, 0);";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (0, 1); INSERT INTO a (x1, x2) VALUES (1, 0); INSERT INTO a (x1, x2) VALUES (1, 1); INSERT INTO a (x1, x2) VALUES (2, 7);";
\$db->query (\$sql);

\$sql = "INSERT INTO b (y1, y2) VALUES (0, 1); INSERT INTO b (y1, y2) VALUES (1, 0); INSERT INTO b (y1, y2) VALUES (2, 7);";
\$db->query (\$sql);

\$sql = "SELECT x1, x2 FROM a;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . ", " . \$row [1] . "<br>n";
echo "<br>n";

\$sql = "SELECT y1, y2 FROM b;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . "<br>n";
echo "<br>n";

\$sql = "SELECT x1, x2, y1, y2 FROM a LEFT JOIN b ON a.x1 = b.y1;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . ", " . \$row [2] . ", " . \$row [3] . "<br>n";
echo "<br>n";

\$sql = "DROP DATABASE mysql20240302" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

0, 0<br>
0, 1<br>
1, 0<br>
1, 1<br>
2, 7<br>
<br>
0, 1<br>
1, 0<br>
2, 7<br>
<br>
0, 0, 0, 1<br>
0, 1, 0, 1<br>
1, 0, 1, 0<br>
1, 1, 1, 0<br>
2, 7, 2, 7<br>
<br>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240302" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE q20240302" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); ";
\$db->query (\$sql);

\$sql = "CREATE TABLE b (x INTEGER); ";
\$db->query (\$sql);

\$sql = "CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
    \$sql = "INSERT INTO a (x) VALUES ("" . rand () % 28 . ""); ";
    \$db->query (\$sql);
    \$sql = "INSERT INTO b (x) VALUES ("" . rand () % 32 . ""); ";
    \$db->query (\$sql);
    \$sql = "INSERT INTO c (x) VALUES ("" . rand () % 64 . ""); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM b
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                INTERSECT
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM b) x
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
    ) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";


\$sql = "DROP DATABASE q20240302" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

4, 20, 16, 1, 2, 8, 15, 11, 21, 3, 24, 19, 13, 23, 5, 26, 0, 27, 6, 22, 29, 12, 9, 7, 17, 14, <br>
4, 20, 16, 1, 2, 8, 15, 11, 21, 3, 24, 19, 13, 23, 5, 26, 0, 27, 42, 48, 46, 14, 44, 18, 47, 32, 53, 56, 6, 9, 34, 28, <br>
6, 19, 22, 29, 23, 5, 12, 2, 13, 9, 16, 1, 27, 7, 8, 20, 17, 24, 14, 11, 42, 48, 46, 44, 18, 47, 32, 53, 56, 34, 28, <br>
20, 16, 1, 2, 8, 11, 24, 19, 13, 23, 5, 27, <br>
20, 16, 11, 24, 5, <br>
6, 5, 9, 16, 20, 24, 14, 11, <br>
20, 16, 11, 24, 5, 6, 9, 14, <br>
20, 16, 11, 24, 5, 6, 9, 14, <br>
20, 16, 1, 2, 8, 11, 24, 19, 13, 23, 5, 27, 14, 6, 9, <br>
20, 16, 11, 24, 5, <br>
19, 23, 5, 2, 13, 16, 1, 27, 8, 20, 24, 11, <br>
19, 23, 5, 2, 13, 16, 1, 27, 8, 20, 24, 11, <br>

#!/bin/bash

if [[  "\$1" == "David" \&amp;\&amp; "\$2" == "Vajda" ]]
then
    echo "Ja, das bin sehr wahrscheinlich ich"
elif [ "\$1" == "David Vajda" ]
then
    echo "Ja, das bin sehr wahrscheinlich ich"
elif [[ "\$1" == "David" \&amp;\&amp; -z "\$2" ]]
then
    echo "Ja, das koennte ich sein"
elif [[ "\$1" == "Vajda" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [ -n "\$1" ]
then
    echo "Das bin ich eher nicht"
else
    echo "Hallo Welt"
    i=0
    while [ \$i -lt 10 ]
    do
        echo "Hallo zum \$((\$i+1))"
        i=\$((\$i+1))
    done
    a=(Ich bin ein Array)
    a+=(und zwar mit Fortsetzung)
    i=0
    while [ \$i -lt 8 ]
    do
        echo "\${a[\$i]}"
        i=\$((\$i+1))
    done
    for s in "\${a[@]}"
    do
        echo "\$s"
    done
    l=\$(ls)
    for s in \$l
    do
        echo "\$s"
    done
fi

#!/bin/bash

/bin/bash myhello.sh "David" "Vajda"
/bin/bash myhello.sh "David Vajda"
/bin/bash myhello.sh "Vajda"
/bin/bash myhello.sh "David"
/bin/bash myhello.sh "Max Mustermann"
/bin/bash myhello.sh

Ja, das bin sehr wahrscheinlich ich
Ja, das bin sehr wahrscheinlich ich
Das koennte ich sein
Ja, das koennte ich sein
Das bin ich eher nicht
Hallo Welt
Hallo zum 1
Hallo zum 2
Hallo zum 3
Hallo zum 4
Hallo zum 5
Hallo zum 6
Hallo zum 7
Hallo zum 8
Hallo zum 9
Hallo zum 10
Ich
bin
ein
Array
und
zwar
mit
Fortsetzung
Ich
bin
ein
Array
und
zwar
mit
Fortsetzung
myhelloexec.sh
myhello.out
myhello.sh

Image Screenshot_20240302_161728

 0 0 0 0 0    0
 1 0 0 0 1    0
 2 0 0 1 0    0
 3 0 0 1 1    0
 4 0 1 0 0    0
 5 0 1 0 1    0
 6 0 1 1 0    0
 7 0 1 1 1    1
 8 1 0 0 0    0
 9 1 0 0 1    1
10 1 0 1 0    0
11 1 0 1 1    0
12 1 1 0 0    1
13 1 1 0 1    0
14 1 1 1 0    0
15 1 1 1 1    1


 7 0 1 1 1    1
 9 1 0 0 1    1
12 1 1 0 0    1
15 1 1 1 1    1


Gruppe 2:
 9 1 0 0 1    1
12 1 1 0 0    1
Gruppe 3:
 7 0 1 1 1    1
Gruppe 4:
15 1 1 1 1    1


9           1 0 0 1     1
12          1 1 0 0     1
7:15        - 1 1 1     1

    y <= (x3 and not x2 and not x1 and x0) or
            (x3 and x2 and not x1 and not x0) or
            (x2 and x1 and x0);
    y <= not (
            (not x3 or x2 or x1 or not x0) and
            (not x3 or not x2 or x1 or x0) and
            (not x3 or not x2 or not x1)
        );

library ieee;
use ieee.std_logic_1164.all;

entity quine20240302 is
port (
    x3, x2, x1, x0: in std_logic;
    y: out std_logic
);
end;

architecture behaviour of quine20240302 is
begin
    y <= (x3 and not x2 and not x1 and x0) or
            (x3 and x2 and not x1 and not x0) or
            (x2 and x1 and x0);
end;

library ieee;
use ieee.std_logic_1164.all;

entity quine20240302testbench is
port (
    y: out std_logic
);
end;

architecture behaviour of quine20240302testbench is
    component quine20240302
    port (
        x3, x2, x1, x0: in std_logic;
        y: out std_logic
    );
    end component;
    signal x3, x2, x1, x0: std_logic;
begin
    q: quine20240302 PORT MAP (x3=>x3, x2=>x2, x1=>x1, x0=>x0, y=>y);

library ieee;
use ieee.std_logic_1164.all;

entity quine20240302 is
port (
    x3, x2, x1, x0: in std_logic;
    y: out std_logic
);
end;

architecture behaviour of quine20240302 is
begin
    y <= (x3 and not x2 and not x1 and x0) or
            (x3 and x2 and not x1 and not x0) or
            (x2 and x1 and x0);
end;

library ieee;
use ieee.std_logic_1164.all;

entity quine20240302testbench is
port (
    y: out std_logic
);
end;

architecture behaviour of quine20240302testbench is
    component quine20240302
    port (
        x3, x2, x1, x0: in std_logic;
        y: out std_logic
    );
    end component;
    signal x3, x2, x1, x0: std_logic;
begin
    q: quine20240302 PORT MAP (x3=>x3, x2=>x2, x1=>x1, x0=>x0, y=>y);

    x0 <= '0' after 0 ns, '1' after 10 ns, '0' after 20 ns, '1' after 30 ns, '0' after 40 ns, '1' after 50 ns, '0' after 60 ns, '1' after 70 ns, '0' after 80 ns, '1' after 90 ns, '0' after 100 ns, '1' after 110 ns, '0' after 120 ns, '1' after 130 ns, '0' after 140 ns, '1' after 150 ns;

    x1 <= '0' after 0 ns, '0' after 10 ns, '1' after 20 ns, '1' after 30 ns, '0' after 40 ns, '0' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns, '0' after 90 ns, '1' after 100 ns, '1' after 110 ns, '0' after 120 ns, '0' after 130 ns, '1' after 140 ns, '1' after 150 ns;

    x2 <= '0' after 0 ns, '0' after 10 ns, '0' after 20 ns, '0' after 30 ns, '1' after 40 ns, '1' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns, '0' after 90 ns, '0' after 100 ns, '0' after 110 ns, '1' after 120 ns, '1' after 130 ns, '1' after 140 ns, '1' after 150 ns;

    x3 <= '0' after 0 ns, '0' after 10 ns, '0' after 20 ns, '0' after 30 ns, '0' after 40 ns, '0' after 50 ns, '0' after 60 ns, '0' after 70 ns, '1' after 80 ns, '1' after 90 ns, '1' after 100 ns, '1' after 110 ns, '1' after 120 ns, '1' after 130 ns, '1' after 140 ns, '1' after 150 ns;
end;