Skip to content
Snippets Groups Projects
Commit 4001413f authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Beispiele und Screenshots 14.4.2025

parent 8fec12b7
No related branches found
No related tags found
No related merge requests found
Showing
with 405 additions and 0 deletions
Letzte Woche, 14.04.2025, 11:34:45
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Verbindungen aufgebaut
Services bereitgestellt,
zunächst lokal, dann via Onion Services auch mit online Zugeschalteten
in TOR Client konfiguriert: Port-Nr. und Dienst eintragen, neu starten
erreichbar über individuelle TOR-ID
Parallel: Netzwerk-Analyse mit Wireshark: ARP, TCP-, IP- und ICMP-Pakete
pult@streaming:~$ pult camera max
pult@streaming:~$ pult camera mim
Usage: /usr/local/bin/pult camera (on|off|min|max)
pult@streaming:~$ pult camera min
pult@streaming:~$ cat $(which pult)
#!/bin/sh
case "$1" in
vnc)
case "$2" in
on) HOME=/home/pult/vnc6 DISPLAY=:6 xtigervncviewer -passwd /home/pult/.vnc/passwd.5926 -viewonly -shared -fullscreen localhost:5926 &;;
off) killall xtigervncviewer;;
guest) HOME=/home/pult/vnc6 DISPLAY=:6 ssvncviewer -listen 6 -viewonly &;;
*) echo "Usage: $0 vnc (on|off|guest)";;
esac;;
camera)
case "$2" in
on) echo "activate_slot 0 deadbeef" > /usr/local/var/run/pult/cvh-camera-6.input
echo "set_geometry_relative_to_canvas 0 rb 0 0 480 360" > /usr/local/var/run/pult/cvh-camera-6.input;;
off) echo "deactivate_slot 0" > /usr/local/var/run/pult/cvh-camera-6.input;;
min) echo "set_geometry_relative_to_canvas 0 rb 0 0 480 360" > /usr/local/var/run/pult/cvh-camera-6.input;;
max) echo "set_geometry_relative_to_canvas 0 lt 0 0 1440 1080" > /usr/local/var/run/pult/cvh-camera-6.input;;
*) echo "Usage: $0 camera (on|off|min|max)";;
esac;;
*) echo "Usage: $0 (vnc|camera) <command>";;
esac
pult@streaming:~$ pult vnc off
pult@streaming:~$ pult vnc on
pult@streaming:~$
TigerVNC-Betrachter (64-bit) Version 1.11.0
Erstellt auf: 2022-01-26 17:59
Copyright (C) 1999-2020 TigerVNC-Team und viele andere (siehe README.rst)
Siehe https://www.tigervnc.org für Informationen zu TigerVNC.
Mon Apr 14 14:15:33 2025
DecodeManager: Detected 1 CPU core(s)
DecodeManager: Decoding data on main thread
CConn: Verbunden mit Rechner localhost, Port 5926
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
CConnection: Choosing security type VncAuth(2)
DesktopWindow: Fenstergröße anpassen, um zufällige Vollbild-Anforderung zu
vermeiden
CConn: Pixelformat depth 24 (32bpp) little-endian rgb888 wird verwendet
XRequest.132: BadWindow (invalid Window parameter) 0x1000005
CConnection: Enabling continuous updates
pult@streaming:~$
cassini/home/peter/bo/2025ss/bs/20250414> date -d '1 hour' +%H:%M
14:45
cassini/home/peter/bo/2025ss/bs/20250414> date -d 'tomorrow, 6:00' +%H:%M
date: ungültiges Datum „tomorrow, 6:00“
cassini/home/peter/bo/2025ss/bs/20250414> date -d 'tomorrow 6:00' +%H:%M
06:00
cassini/home/peter/bo/2025ss/bs/20250414> date -d '1 hour ago' +%H:%M
12:45
cassini/home/peter/bo/2025ss/bs/20250414> date -d '1 hour ago'
Mo 14. Apr 12:46:10 CEST 2025
cassini/home/peter/bo/2025ss/bs/20250414>
cassini/home/peter/bo/2025ss/bs/20250414> date +"%H:%M:%S.%N"
13:47:22.685319931
cassini/home/peter/bo/2025ss/bs/20250414> date +"%H:%M:%S.$((%N / 1000000))"
bash: %N / 1000000: Syntaxfehler: Operator erwartet. (Fehlerverursachendes Zeichen ist "%N / 1000000").
cassini/home/peter/bo/2025ss/bs/20250414> date +"%N"
053883631
cassini/home/peter/bo/2025ss/bs/20250414> echo $(date +"%N")
350232792
cassini/home/peter/bo/2025ss/bs/20250414> echo "$(date +%N) / 1000000"
830436011 / 1000000
cassini/home/peter/bo/2025ss/bs/20250414> echo "$(date +%N) / 1000000" | bc
334
cassini/home/peter/bo/2025ss/bs/20250414> echo "date +%H:%M:%S.$($(date +%N) / 1000000" | bc)> ^C
cassini/home/peter/bo/2025ss/bs/20250414> echo "date +%H:%M:%S.$($(date +%N) / 1000000 | bc)"bash: 720044512: Kommando nicht gefunden.
date +%H:%M:%S.
cassini/home/peter/bo/2025ss/bs/20250414> echo "$(date +%N) / 1000000" | bc 46
cassini/home/peter/bo/2025ss/bs/20250414> printf "%03d\n" "$(date +%N) / 1000000" | bc
bash: printf: 591932407 / 1000000: Ungültige Zahl.
591932407
cassini/home/peter/bo/2025ss/bs/20250414> printf "%03d\n" $("$(date +%N) / 1000000" | bc)
bash: 353455775 / 1000000: Datei oder Verzeichnis nicht gefunden
000
cassini/home/peter/bo/2025ss/bs/20250414>
cassini/home/peter/bo/2025ss/bs/20250414> sudo -i
root@cassini:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465,8G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 465,3G 0 part
└─sda5_crypt 254:0 0 465,3G 0 crypt
├─cassini--vg-root 254:1 0 464,3G 0 lvm /
└─cassini--vg-swap_1 254:2 0 980M 0 lvm [SWAP]
sdb 8:16 1 3,9G 0 disk
└─sdb1 8:17 1 1M 0 part
root@cassini:~# chown peter:peter /dev/sdb
root@cassini:~#
Abgemeldet
cassini/home/peter/bo/2025ss/bs/20250414> ls -l /dev/sdb
brw-rw---- 1 peter peter 8, 16 14. Apr 12:04 /dev/sdb
cassini/home/peter/bo/2025ss/bs/20250414> dd if=/dev/zero of=/dev/sdb
^C82889+0 Datensätze ein
82889+0 Datensätze aus
42439168 Bytes (42 MB, 40 MiB) kopiert, 22,2505 s, 1,9 MB/s
cassini/home/peter/bo/2025ss/bs/20250414> sudo hexdump -C /dev/sdb | less
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
02879200 69 68 2a 99 6e d1 16 31 5c d2 83 d3 fb 3c bf fc |ih*.n..1\....<..|
02879210 ac 05 36 18 9e f8 ef e5 a7 c5 0f 79 a8 9b a0 88 |..6........y....|
02879220 f9 cb b2 9c 76 ed cd eb c2 02 1b 6f 63 86 6d 7a |....v......oc.mz|
02879230 b5 d5 0f fc 8c d4 ef c8 22 02 70 b2 69 51 4e 6a |........".p.iQNj|
02879240 2d 45 dc 3e 48 1e 08 61 75 69 4f 85 5b 1f e9 d6 |-E.>H..auiO.[...|
02879250 06 c0 82 63 a5 06 54 23 c5 4b 28 da c3 8f 83 d5 |...c..T#.K(.....|
02879260 78 ff ee f4 f2 ea 94 9b 45 49 8a af be 9e 3b 72 |x.......EI....;r|
02879270 32 83 f2 b2 d0 e7 bd a4 ff 19 94 14 24 f6 80 95 |2...........$...|
02879280 f2 06 4c f4 e1 51 ea 3c 07 72 24 ca 6e f5 5f 59 |..L..Q.<.r$.n._Y|
02879290 bd 62 40 d0 34 66 9f 14 14 c4 42 a7 e5 39 c1 2b |.b@.4f....B..9.+|
028792a0 28 0c a5 a9 23 81 da 27 68 9c 7a 4a 62 c1 4f 97 |(...#..'h.zJb.O.|
028792b0 af d5 65 d7 8e 62 32 30 3a db 4e 03 29 9d 64 22 |..e..b20:.N.).d"|
028792c0 e4 06 44 5f 87 97 9f 0a 67 df 4b bf e7 a0 3c eb |..D_....g.K...<.|
028792d0 19 2b 3f ec dc ac 5e ad 4a 9f 35 21 d3 08 c6 23 |.+?...^.J.5!...#|
028792e0 a2 51 0a 9c 93 5c ed f9 93 42 a0 1c 69 5b 39 01 |.Q...\...B..i[9.|
028792f0 97 5d 3b 4c ae dd 02 34 b0 89 51 8e d6 46 4a d9 |.];L...4..Q..FJ.|
02879300 9f aa ce 1c 02 70 13 b6 63 e6 28 46 7e 69 51 e6 |.....p..c.(F~iQ.|
02879310 e3 bf 91 e6 2c a0 e0 e1 40 c9 c1 de 5e 3a c9 09 |....,...@...^:..|
02879320 4b 5e 12 5e 51 6d 69 5d 47 c0 56 11 c9 95 a3 d6 |K^.^Qmi]G.V.....|
02879330 5d b8 7e 3f bd 1e 77 53 e7 87 d0 1e dc 29 26 30 |].~?..wS.....)&0|
02879340 40 2e 9c 04 8f d0 da c7 8b 94 f0 55 f6 2c bc d0 |@..........U.,..|
02879350 d2 5b 92 18 50 65 7d e7 e3 a4 e0 c3 c2 6d 99 01 |.[..Pe}......m..|
02879360 49 bc 26 c5 9e f8 a9 a9 90 60 71 6e 91 aa 12 b4 |I.&......`qn....|
02879370 99 6e c4 bd 83 3b 93 5e db 41 a4 9e 4e a4 32 1a |.n...;.^.A..N.2.|
02879380 a9 10 0a a2 12 1c 0d e2 71 c4 15 d6 d1 65 85 91 |........q....e..|
02879390 0e d3 91 c2 ec b1 7d c3 68 cf 2e 3f f5 9f 81 df |......}.h..?....|
028793a0 e2 f2 fb 2f 6a f2 5c 76 e0 10 f3 94 98 69 20 d1 |.../j.\v.....i .|
028793b0 14 48 98 cb 71 2e c1 13 bc 69 1f fd c8 46 e7 83 |.H..q....i...F..|
028793c0 46 b2 41 cc ec 2d e9 35 22 c5 a8 b3 ee f7 b6 61 |F.A..-.5"......a|
028793d0 ba 89 e6 13 4d d3 df fe cf 70 a0 0d b3 70 74 81 |....M....p...pt.|
028793e0 36 e3 20 bb c4 ff 1b 3e 00 ed cd a3 b6 85 69 d1 |6. ....>......i.|
028793f0 b7 6c 4c 92 f1 f4 86 da 64 74 f9 62 0c 1f 34 63 |.lL.....dt.b..4c|
02879400 67 29 2d 9c 90 0a d3 55 2c 5a 10 b1 15 ae 40 37 |g)-....U,Z....@7|
02879410 fc 6d 59 c4 35 7f ec 4f cb d8 e5 79 59 19 be d4 |.mY.5..O...yY...|
02879420 52 bc 58 b9 a8 d5 9a 77 5e 59 e5 68 e2 ea cd 6e |R.X....w^Y.h...n|
02879430 cb f8 66 cf 71 04 80 3b 0e dc e0 de 8d 36 d8 3b |..f.q..;.....6.;|
02879440 f1 5b b4 2b a8 2a 31 4d 1d ce 0c 56 9c d4 ea ce |.[.+.*1M...V....|
02879450 21 3d 04 bf 6a c4 7c 14 36 15 52 12 f9 32 f8 d7 |!=..j.|.6.R..2..|
02879460 44 84 88 e7 97 1a 22 20 2b 1d c4 20 ca 16 a6 a7 |D....." +.. ....|
02879470 aa 20 7a 18 9e 50 f0 de c6 da 84 a8 91 d8 aa 43 |. z..P.........C|
02879480 93 bd 2a 70 f5 91 99 0f ab b4 70 3c dc 60 df 2d |..*p......p<.`.-|
cassini/home/peter/bo/2025ss/bs/20250414> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465,8G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 465,3G 0 part
└─sda5_crypt 254:0 0 465,3G 0 crypt
├─cassini--vg-root 254:1 0 464,3G 0 lvm /
└─cassini--vg-swap_1 254:2 0 980M 0 lvm [SWAP]
sdb 8:16 1 3,9G 0 disk
cassini/home/peter/bo/2025ss/bs/20250414> mount /media/usb1/
mount: /media/usb1: special device /dev/sdb1 does not exist.
dmesg(1) may have more information after failed mount system call.
cassini/home/peter/bo/2025ss/bs/20250414> mount /media/usb0
mount: /media/usb0: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.
cassini/home/peter/bo/2025ss/bs/20250414>
cassini/home/peter/bo/2025ss/bs/20250414> cat > /dev/sdb
Dies ist ein Test.
cassini/home/peter/bo/2025ss/bs/20250414> cat /dev/sdb
Dies ist ein Test.
^C
cassini/home/peter/bo/2025ss/bs/20250414>
cassini/home/peter/bo/2025ss/bs/20250414> /sbin/mkdosfs /dev/sdb
mkfs.fat 4.2 (2021-01-31)
cassini/home/peter/bo/2025ss/bs/20250414> /sbin/mkfs -t fat /dev/sdb
mkfs: failed to execute mkfs.fat: Datei oder Verzeichnis nicht gefunden
cassini/home/peter/bo/2025ss/bs/20250414> mount /dev/sdb
cassini/home/peter/bo/2025ss/bs/20250414> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465,8G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 465,3G 0 part
└─sda5_crypt 254:0 0 465,3G 0 crypt
├─cassini--vg-root 254:1 0 464,3G 0 lvm /
└─cassini--vg-swap_1 254:2 0 980M 0 lvm [SWAP]
sdb 8:16 1 3,9G 0 disk /media/usb0
cassini/home/peter/bo/2025ss/bs/20250414> ls -la /media/usb0
insgesamt 8
drwxr-xr-x 2 peter peter 4096 1. Jan 1970 .
drwxr-xr-x 17 root root 4096 4. Dez 2020 ..
cassini/home/peter/bo/2025ss/bs/20250414> echo "Dies ist ein Test." > /media/usb0/test.txt
cassini/home/peter/bo/2025ss/bs/20250414> ls -la /media/usb0
insgesamt 12
drwxr-xr-x 2 peter peter 4096 1. Jan 1970 .
drwxr-xr-x 17 root root 4096 4. Dez 2020 ..
-rwxr-xr-x 1 peter peter 19 14. Apr 15:24 test.txt
cassini/home/peter/bo/2025ss/bs/20250414> cat /media/usb0/test.txt
Dies ist ein Test.
cassini/home/peter/bo/2025ss/bs/20250414>
cassini/home/peter/bo/2025ss/bs/20250414> sudo hexdump -C /dev/sdb | head -61
00000000 eb 58 90 6d 6b 66 73 2e 66 61 74 00 02 08 20 00 |.X.mkfs.fat... .|
00000010 02 00 00 00 00 f8 00 00 3e 00 81 00 00 00 00 00 |........>.......|
00000020 cc cf 7c 00 28 1f 00 00 00 00 00 00 02 00 00 00 |..|.(...........|
00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 80 01 29 88 16 1e d0 4e 4f 20 4e 41 4d 45 20 20 |..)....NO NAME |
00000050 20 20 46 41 54 33 32 20 20 20 0e 1f be 77 7c ac | FAT32 ...w|.|
00000060 22 c0 74 0b 56 b4 0e bb 07 00 cd 10 5e eb f0 32 |".t.V.......^..2|
00000070 e4 cd 16 cd 19 eb fe 54 68 69 73 20 69 73 20 6e |.......This is n|
00000080 6f 74 20 61 20 62 6f 6f 74 61 62 6c 65 20 64 69 |ot a bootable di|
00000090 73 6b 2e 20 20 50 6c 65 61 73 65 20 69 6e 73 65 |sk. Please inse|
000000a0 72 74 20 61 20 62 6f 6f 74 61 62 6c 65 20 66 6c |rt a bootable fl|
000000b0 6f 70 70 79 20 61 6e 64 0d 0a 70 72 65 73 73 20 |oppy and..press |
000000c0 61 6e 79 20 6b 65 79 20 74 6f 20 74 72 79 20 61 |any key to try a|
000000d0 67 61 69 6e 20 2e 2e 2e 20 0d 0a 00 00 00 00 00 |gain ... .......|
000000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200 52 52 61 41 00 00 00 00 00 00 00 00 00 00 00 00 |RRaA............|
00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000003e0 00 00 00 00 72 72 41 61 2a 92 0f 00 02 00 00 00 |....rrAa*.......|
000003f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000c00 eb 58 90 6d 6b 66 73 2e 66 61 74 00 02 08 20 00 |.X.mkfs.fat... .|
00000c10 02 00 00 00 00 f8 00 00 3e 00 81 00 00 00 00 00 |........>.......|
00000c20 cc cf 7c 00 28 1f 00 00 00 00 00 00 02 00 00 00 |..|.(...........|
00000c30 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000c40 80 00 29 88 16 1e d0 4e 4f 20 4e 41 4d 45 20 20 |..)....NO NAME |
00000c50 20 20 46 41 54 33 32 20 20 20 0e 1f be 77 7c ac | FAT32 ...w|.|
00000c60 22 c0 74 0b 56 b4 0e bb 07 00 cd 10 5e eb f0 32 |".t.V.......^..2|
00000c70 e4 cd 16 cd 19 eb fe 54 68 69 73 20 69 73 20 6e |.......This is n|
00000c80 6f 74 20 61 20 62 6f 6f 74 61 62 6c 65 20 64 69 |ot a bootable di|
00000c90 73 6b 2e 20 20 50 6c 65 61 73 65 20 69 6e 73 65 |sk. Please inse|
00000ca0 72 74 20 61 20 62 6f 6f 74 61 62 6c 65 20 66 6c |rt a bootable fl|
00000cb0 6f 70 70 79 20 61 6e 64 0d 0a 70 72 65 73 73 20 |oppy and..press |
00000cc0 61 6e 79 20 6b 65 79 20 74 6f 20 74 72 79 20 61 |any key to try a|
00000cd0 67 61 69 6e 20 2e 2e 2e 20 0d 0a 00 00 00 00 00 |gain ... .......|
00000ce0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000df0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000e00 52 52 61 41 00 00 00 00 00 00 00 00 00 00 00 00 |RRaA............|
00000e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000fe0 00 00 00 00 72 72 41 61 2a 92 0f 00 02 00 00 00 |....rrAa*.......|
00000ff0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00001000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00004000 f8 ff ff 0f ff ff ff 0f f8 ff ff 0f 00 00 00 00 |................|
00004010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
003e9000 f8 ff ff 0f ff ff ff 0f f8 ff ff 0f 00 00 00 00 |................|
003e9010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
007cf000 44 69 65 73 20 69 73 74 20 65 69 6e 20 54 65 73 |Dies ist ein Tes|
007cf010 74 2e 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 |t...............|
007cf020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
02879200 69 68 2a 99 6e d1 16 31 5c d2 83 d3 fb 3c bf fc |ih*.n..1\....<..|
02879210 ac 05 36 18 9e f8 ef e5 a7 c5 0f 79 a8 9b a0 88 |..6........y....|
02879220 f9 cb b2 9c 76 ed cd eb c2 02 1b 6f 63 86 6d 7a |....v......oc.mz|
cassini/home/peter/bo/2025ss/bs/20250414>
iostreams-04.txt:Dies ist ein Test.
iostreams-04.txt:Dies ist ein Test.
iostreams-09.txt:cassini/home/peter/bo/2025ss/bs/20250414> echo "Dies ist ein Test." >> /media/usb1/test.txt
iostreams-12.txt:Dies ist ein Test.
grep: test: Ist ein Verzeichnis
test.txt:Dies ist ein Test.
unix-20250324.tex: Dies ist ein Test.
unix-20250324.tex: $ ¡echo "Dies ist ein Test." > test.txt¿
unix-20250324.tex: Dies ist ein Test.
unix-20250324.tex: $ ¡echo "Dies ist noch ein Test." >> test.txt¿
unix-20250324.tex: Dies ist ein Test.
unix-20250324.tex: Dies ist noch ein Test.
grep: usbstick.hd: Übereinstimmungen in Binärdatei
cat: gibtsnicht.txt: Datei oder Verzeichnis nicht gefunden
hello="Hello, world!"
#!/bin/bash
. hello-01.cfg
echo "$hello"
hello="Hello, world!"
#!/bin/bash
./hello-02.cfg
echo "$hello"
#!/bin/sh
echo 'Hello, world!'
#!/bin/bash
cat > langer-test.txt << EOF
Dies ist ein Test.
Dies auch.
Auch diese Zeile gehört noch mit zum Test.
EOF
cassini/home/peter/bo/2025ss/bs/20250414> grep Test *.tex
Dies ist ein Test.
$ ¡echo "Dies ist ein Test." > test.txt¿
Dies ist ein Test.
$ ¡echo "Dies ist noch ein Test." >> test.txt¿
Dies ist ein Test.
Dies ist noch ein Test.
cassini/home/peter/bo/2025ss/bs/20250414> if grep Test *.tex; then echo "gefunden"; fi
Dies ist ein Test.
$ ¡echo "Dies ist ein Test." > test.txt¿
Dies ist ein Test.
$ ¡echo "Dies ist noch ein Test." >> test.txt¿
Dies ist ein Test.
Dies ist noch ein Test.
gefunden
cassini/home/peter/bo/2025ss/bs/20250414> if grep Test *.tex > /dev/null; then echo "gefunden"; fi
gefunden
cassini/home/peter/bo/2025ss/bs/20250414> if grep Toast *.tex > /dev/null; then echo "gefunden"; fi
cassini/home/peter/bo/2025ss/bs/20250414> if grep Toast *.tex > /dev/null; then echo "gefunden"; else echo "nicht gefunden"; fi
nicht gefunden
cassini/home/peter/bo/2025ss/bs/20250414>
cassini/home/peter/bo/2025ss/bs/20250414> grep Test *.tex
Dies ist ein Test.
$ ¡echo "Dies ist ein Test." > test.txt¿
Dies ist ein Test.
$ ¡echo "Dies ist noch ein Test." >> test.txt¿
Dies ist ein Test.
Dies ist noch ein Test.
cassini/home/peter/bo/2025ss/bs/20250414> echo $?
0
cassini/home/peter/bo/2025ss/bs/20250414> grep Toast *.tex
cassini/home/peter/bo/2025ss/bs/20250414> echo $?
1
cassini/home/peter/bo/2025ss/bs/20250414> grep Toast *.bla
grep: *.bla: Datei oder Verzeichnis nicht gefunden
cassini/home/peter/bo/2025ss/bs/20250414> echo $?
2
cassini/home/peter/bo/2025ss/bs/20250414>
#!/bin/bash
i=0
not_found=true
while $not_found; do
echo "$i"
i=$((i + 1))
if [ "$i" = "10" ]; then
not_found=false
fi
done
cassini/home/peter/bo/2025ss/bs/20250414> ./while-01.sh
0
1
2
3
4
5
6
7
8
9
cassini/home/peter/bo/2025ss/bs/20250414> which true
/usr/bin/true
cassini/home/peter/bo/2025ss/bs/20250414> which false
/usr/bin/false
cassini/home/peter/bo/2025ss/bs/20250414>
cassini/home/peter/bo/2025ss/bs/20250414> cat >> tcp-service-01.txt
cassini/home/peter/bo/2025ss/bs/20250414> cat hello.sh
#!/bin/sh
echo 'Hello, world!'
cassini/home/peter/bo/2025ss/bs/20250414> ./hello.sh
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250414> nc -l -p 1234 -c ./hello.sh
cassini/home/peter/bo/2025ss/bs/20250414>
cassini/home/peter/bo/2025ss/bs/20250414> cat >> tcp-service-01.txt
cassini/home/peter> nc localhost 1234
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250414> t
insgesamt 12
lrwxrwxrwx 1 peter peter 29 31. Mär 09:11 unix-20250324.tex -> ../20250324/unix-20250324.tex
lrwxrwxrwx 1 peter peter 29 31. Mär 09:11 unix-20250324.pdf -> ../20250324/unix-20250324.pdf
-rw-r--r-- 1 peter peter 372 14. Apr 11:43 bs-20250414.txt
-rwxr-xr-x 1 peter peter 32 14. Apr 11:45 hello.sh
-rw-r--r-- 1 peter peter 319 14. Apr 11:47 tcp-service-01.txt
cassini/home/peter/bo/2025ss/bs/20250414> cat tcp-service-01.txt
cassini/home/peter/bo/2025ss/bs/20250414> cat hello.sh
#!/bin/sh
echo 'Hello, world!'
cassini/home/peter/bo/2025ss/bs/20250414> ./hello.sh
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250414> nc -l -p 1234 -c ./hello.sh
cassini/home/peter/bo/2025ss/bs/20250414>
cassini/home/peter> nc localhost 1234
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250414>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment