From ffd8721277c324d98deea273f15e2be72ae29178 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hypki Date: Mon, 24 Apr 2023 16:36:00 +0200 Subject: [PATCH] Added other files from previous lecture; --- dest/plik3 | 0 dest/plik444444 | 0 hello.sh | 3 +++ hello2.sh | 3 +++ ping.sh | 16 ++++++++++++++++ ping2.sh | 15 +++++++++++++++ plik2 | 4 ++++ plik2222222 | 0 plik3 | 4 ++++ wynik.txt | 5 +++++ 10 files changed, 50 insertions(+) create mode 100644 dest/plik3 create mode 100644 dest/plik444444 create mode 100755 hello.sh create mode 100755 hello2.sh create mode 100755 ping.sh create mode 100755 ping2.sh create mode 100644 plik2 create mode 100644 plik2222222 create mode 100644 plik3 create mode 100644 wynik.txt diff --git a/dest/plik3 b/dest/plik3 new file mode 100644 index 0000000..e69de29 diff --git a/dest/plik444444 b/dest/plik444444 new file mode 100644 index 0000000..e69de29 diff --git a/hello.sh b/hello.sh new file mode 100755 index 0000000..98854fe --- /dev/null +++ b/hello.sh @@ -0,0 +1,3 @@ +echo "Cześć `whoami`, wpisałeś $*" + +echo "Cześć $USER" diff --git a/hello2.sh b/hello2.sh new file mode 100755 index 0000000..99bc1f4 --- /dev/null +++ b/hello2.sh @@ -0,0 +1,3 @@ +echo "Cześć $USER, wpisałeś parameter wejś. $*" + +echo "Cześć `whoami`" diff --git a/ping.sh b/ping.sh new file mode 100755 index 0000000..069d4fe --- /dev/null +++ b/ping.sh @@ -0,0 +1,16 @@ +while true +do + +read userinput + +if [ $userinput = "ping" ] +then + echo "pong" +elif [ $userinput = "exit" ] +then + break +else + echo "Nie umiesz grać" +fi + +done diff --git a/ping2.sh b/ping2.sh new file mode 100755 index 0000000..228ed42 --- /dev/null +++ b/ping2.sh @@ -0,0 +1,15 @@ +i=1 +while [ $i -eq 1 ] +do + +read userinput + +if [ $userinput == "ping" ] +then + echo "pong" +else + echo "nie umiesz grać" + echo "${userinput:2:6}" +fi + +done diff --git a/plik2 b/plik2 new file mode 100644 index 0000000..cb2a8ed --- /dev/null +++ b/plik2 @@ -0,0 +1,4 @@ +3 Poznan +3 Wroclaw +10 Wuuuarszawa +3 Szczecin diff --git a/plik2222222 b/plik2222222 new file mode 100644 index 0000000..e69de29 diff --git a/plik3 b/plik3 new file mode 100644 index 0000000..575d2e6 --- /dev/null +++ b/plik3 @@ -0,0 +1,4 @@ +3 Poznan +3 Wroclaw +10 Wuuuarszawa +2 Szczecin diff --git a/wynik.txt b/wynik.txt new file mode 100644 index 0000000..18d2ac9 --- /dev/null +++ b/wynik.txt @@ -0,0 +1,5 @@ +drwx------+ 2 ahypki faculty 0 lut 27 18:38 dest +-rw-------+ 1 ahypki faculty 0 lut 27 18:34 plik2222222 +-rw-------+ 1 ahypki faculty 0 mar 20 2023 wynik.txt +total 1 +-rw-------+ 1 ahypki faculty 42 mar 20 15:50 plik2