diff --git a/20210423/echo-1.txt b/20210423/echo-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..e39b07beb181a870f7683da662d54ac3fd45bdc3 --- /dev/null +++ b/20210423/echo-1.txt @@ -0,0 +1,4 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo Test; ls +Test +test test-2.c unix-20210423.pdf unix-20210423.tex wildcards-1.txt wildcards-2.txt +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/echo-2.txt b/20210423/echo-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..e20f9bccbce32e74e0dbb3f5caa87cf0874d5c6b --- /dev/null +++ b/20210423/echo-2.txt @@ -0,0 +1,3 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo "Test; ls" +Test; ls +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/exec-output-1.txt b/20210423/exec-output-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..6bfef64301ada2552a032410405fc95828e9e8d2 --- /dev/null +++ b/20210423/exec-output-1.txt @@ -0,0 +1,12 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo ls +ls +cassini/home/peter/bo/2021ss/bs/20210423> $(echo ls) +echo-1.txt grep-2.txt iostreams-2.txt permissions-1.txt test.txt +echo-2.txt grep-3.txt iostreams-3.txt pipes-1.txt unix-20210423.pdf +find-1.txt grep-4.txt iostreams-4.txt pipes-2.txt unix-20210423.tex +find-2.txt grep-5.txt iostreams-5.txt pipes-3.txt vic +find-3.txt hello-error.txt iostreams-6.txt test wildcards-1.txt +find-4.txt hello-files-and-error.txt iostreams-7.txt test-1.c wildcards-2.txt +find-5.txt hello-files.txt iostreams-8.txt test-2.c wildcards-3.txt +grep-1.txt iostreams-1.txt iostreams-.txt2 test.bc xkcd +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/exec-output-2.txt b/20210423/exec-output-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..8da1d6318741453f610d9c55640af13948673dff --- /dev/null +++ b/20210423/exec-output-2.txt @@ -0,0 +1,11 @@ +cassini/home/peter/bo/2021ss/bs/20210423> locate listings.pdf +/home/peter/bo/doc/listings.pdf +/usr/share/doc/texlive-doc/latex/checklistings/checklistings.pdf +/usr/share/doc/texlive-doc/latex/iodhbwm/examples/listings/iodhbwm-listings.pdf +/usr/share/doc/texlive-doc/latex/listings/listings.pdf +/usr/share/doc/texlive-doc/latex/tagpdf/ex-spaceglyph-listings.pdf +/usr/share/doc/texlive-doc/latex/xsim/examples/xsim.listings.pdf +cassini/home/peter/bo/2021ss/bs/20210423> locate listings.pdf | head -1 +/home/peter/bo/doc/listings.pdf +cassini/home/peter/bo/2021ss/bs/20210423> xpdf $(locate listings.pdf | head -1) +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/exec-output-3.txt b/20210423/exec-output-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..3e8cf4e13e86960215f0b93c0cea0faa0390741c --- /dev/null +++ b/20210423/exec-output-3.txt @@ -0,0 +1,4 @@ +cassini/home/peter/bo/2021ss/bs/20210423> file_template=$(ls -rt *.c *.cpp *.sh *.py *.tex *.diff 2>/dev/null | tail -1) +cassini/home/peter/bo/2021ss/bs/20210423> echo $file_template +params-3.sh +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/find-1.txt b/20210423/find-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..51a80ae973e07b4283cb2ca38861b2dad13b930c --- /dev/null +++ b/20210423/find-1.txt @@ -0,0 +1,15 @@ +cassini/home/peter/bo/2021ss/bs> find -name "test*" +./20210423/test-1.c +./20210423/test-2.c +./20210423/test +./20210416/test-3.txt +./20210416/test +./20210416/test-1.txt +cassini/home/peter/bo/2021ss/bs> find . -name "test*" -print +./20210423/test-1.c +./20210423/test-2.c +./20210423/test +./20210416/test-3.txt +./20210416/test +./20210416/test-1.txt +cassini/home/peter/bo/2021ss/bs> diff --git a/20210423/find-2.txt b/20210423/find-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..2d9eaa12bc77f960e7f81e0777b947349d052148 --- /dev/null +++ b/20210423/find-2.txt @@ -0,0 +1,6 @@ +cassini/home/peter/bo/2021ss/bs> find . -name "test-[1-2].txt" -print +./20210416/test-1.txt +cassini/home/peter/bo/2021ss/bs> find . -name "test-[1-2].[ch]" -print +./20210423/test-1.c +./20210423/test-2.c +cassini/home/peter/bo/2021ss/bs> diff --git a/20210423/find-3.txt b/20210423/find-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..0e1f55793dd6e353ecb653529b1d5918f87124a0 --- /dev/null +++ b/20210423/find-3.txt @@ -0,0 +1,17 @@ +cassini/home/peter/bo/2021ss/bs> find . -name "test-[1-2].[ch]" -exec ls -l {} \; +-rw-r--r-- 2 peter peter 82 Apr 23 11:56 ./20210423/test-1.c +-rw-r--r-- 2 peter peter 82 Apr 23 11:56 ./20210423/test-2.c +cassini/home/peter/bo/2021ss/bs> find . -name "test-[1-2].[ch]" -exec ls -l {} + +-rw-r--r-- 2 peter peter 82 Apr 23 11:56 ./20210423/test-1.c +-rw-r--r-- 2 peter peter 82 Apr 23 11:56 ./20210423/test-2.c +cassini/home/peter/bo/2021ss/bs> find . -name "test-*" -exec ls -l {} \; +-rw-r--r-- 2 peter peter 82 Apr 23 11:56 ./20210423/test-1.c +-rw-r--r-- 2 peter peter 82 Apr 23 11:56 ./20210423/test-2.c +lrwxrwxrwx 1 peter peter 10 Apr 16 14:37 ./20210416/test-3.txt -> test-1.txt +-rw-r--r-- 1 peter peter 7 Apr 16 14:47 ./20210416/test-1.txt +cassini/home/peter/bo/2021ss/bs> find . -name "test-*" -exec ls -l {} + +-rw-r--r-- 1 peter peter 7 Apr 16 14:47 ./20210416/test-1.txt +lrwxrwxrwx 1 peter peter 10 Apr 16 14:37 ./20210416/test-3.txt -> test-1.txt +-rw-r--r-- 2 peter peter 82 Apr 23 11:56 ./20210423/test-1.c +-rw-r--r-- 2 peter peter 82 Apr 23 11:56 ./20210423/test-2.c +cassini/home/peter/bo/2021ss/bs> diff --git a/20210423/find-4.txt b/20210423/find-4.txt new file mode 100644 index 0000000000000000000000000000000000000000..07def8f1d358691756227aa407c8708828b623f4 --- /dev/null +++ b/20210423/find-4.txt @@ -0,0 +1,38 @@ +cassini/home/peter/bo/2021ss/bs/20210423> find . -type f +./test-1.c +./wildcards-1.txt +./test-2.c +./echo-2.txt +./.test.txt +./wildcards-2.txt +./permissions-1.txt +./echo-1.txt +cassini/home/peter/bo/2021ss/bs/20210423> find . -type d +. +./test +cassini/home/peter/bo/2021ss/bs/20210423> find .. -type d +.. +../common +../20210423 +../20210423/test +../20210416 +../20210416/test +../ausarbeitungen +../ausarbeitungen/maas +../20210409 +cassini/home/peter/bo/2021ss/bs/20210423> find .. -type l +../20210423/unix-20210423.pdf +../20210423/unix-20210423.tex +../20210416/test-3.txt +../20210416/unix-20210416.tex +../20210416/bs-20210416.tex +../20210416/bs-20210416.pdf +../20210416/unix-20210416.pdf +../20210409/logo-hochschule-bochum-cvh-text.pdf +../20210409/pgslides.sty +../20210409/Operating_system_placement-de.pdf +../20210409/logo-hochschule-bochum.pdf +../20210409/pathfinder.jpg +../20210409/philosophenproblem.jpg +../.git +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/find-5.txt b/20210423/find-5.txt new file mode 100644 index 0000000000000000000000000000000000000000..8baf885795b845da6f19f3cacd5aae66c5f14172 --- /dev/null +++ b/20210423/find-5.txt @@ -0,0 +1,22 @@ +cassini/home/peter/bo/2021ss/bs/20210423> find .. -name "find-*.txt" +../20210423/find-1.txt +../20210416/find-1.txt +../20210416/find-4.txt +../20210416/find-2.txt +../20210416/find-3.txt +../find-1.txt +../find-2.txt +../find-3.txt +cassini/home/peter/bo/2021ss/bs/20210423> cd .. +cassini/home/peter/bo/2021ss/bs> t +insgesamt 36 +drwxr-xr-x 3 peter peter 4096 Apr 9 15:18 ausarbeitungen +drwxr-xr-x 2 peter peter 4096 Apr 16 10:26 20210409 +-rw-r--r-- 1 peter peter 1329 Apr 16 11:50 projekte.txt +drwxr-xr-x 2 peter peter 4096 Apr 16 14:45 common +drwxr-xr-x 3 peter peter 4096 Apr 23 11:06 20210416 +-rw-r--r-- 1 peter peter 378 Apr 23 12:00 find-1.txt +-rw-r--r-- 1 peter peter 236 Apr 23 12:01 find-2.txt +-rw-r--r-- 1 peter peter 1108 Apr 23 12:04 find-3.txt +drwxr-xr-x 3 peter peter 4096 Apr 23 12:13 20210423 +cassini/home/peter/bo/2021ss/bs> diff --git a/20210423/for-1.txt b/20210423/for-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..f6e41af6c90d4bf75e250fc75dd4d0a69079de1a --- /dev/null +++ b/20210423/for-1.txt @@ -0,0 +1,21 @@ +cassini/home/peter/bo/2021ss/bs/20210423> for x in wichtig Wichtig WICHTIG; do touch $x; done +cassini/home/peter/bo/2021ss/bs/20210423> for x in wichtig Wichtig WICHTIG; do rm $x; done +cassini/home/peter/bo/2021ss/bs/20210423> seq 7 +1 +2 +3 +4 +5 +6 +7 +cassini/home/peter/bo/2021ss/bs/20210423> for x in $(seq 7); do touch wichtig-$x.txt; done +cassini/home/peter/bo/2021ss/bs/20210423> ls -l wichtig* +-rw-r--r-- 1 peter peter 0 Apr 23 14:45 wichtig-1.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:45 wichtig-2.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:45 wichtig-3.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:45 wichtig-4.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:45 wichtig-5.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:45 wichtig-6.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:45 wichtig-7.txt +cassini/home/peter/bo/2021ss/bs/20210423> for x in $(seq 7); do rm wichtig-$x.txt; done +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/for-2.txt b/20210423/for-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..fae0292bc4037a527da95d445713b5d6aa4cac3d --- /dev/null +++ b/20210423/for-2.txt @@ -0,0 +1,18 @@ +cassini/home/peter/bo/2021ss/bs/20210423> for x in $(seq 7); do touch wichtig-$x.txt; done +cassini/home/peter/bo/2021ss/bs/20210423> ls -l wichtig* +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 wichtig-1.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 wichtig-2.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 wichtig-3.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 wichtig-4.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 wichtig-5.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 wichtig-6.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 wichtig-7.txt +cassini/home/peter/bo/2021ss/bs/20210423> for x in wichtig-*.txt; do mv -i "$x" "un$x"; done cassini/home/peter/bo/2021ss/bs/20210423> ls -l *wichtig* +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 unwichtig-1.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 unwichtig-2.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 unwichtig-3.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 unwichtig-4.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 unwichtig-5.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 unwichtig-6.txt +-rw-r--r-- 1 peter peter 0 Apr 23 14:46 unwichtig-7.txt +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/grep-1.txt b/20210423/grep-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..c4c92d1f6c8daebb56b21875765792fd91adf251 --- /dev/null +++ b/20210423/grep-1.txt @@ -0,0 +1,22 @@ +cassini/home/peter/bo/2021ss/bs/20210423> grep Hello * +grep: test: Ist ein Verzeichnis +test-1.c: printf ("Hello, world!\n"); +test-2.c: printf ("Hello, world!\n"); +unix-20210423.tex: printf ("Hello, world!\n"); +unix-20210423.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"} +cassini/home/peter/bo/2021ss/bs/20210423> grep "H[ae]llo" * +grep: test: Ist ein Verzeichnis +test-1.c: printf ("Hello, world!\n"); +test-2.c: printf ("Hello, world!\n"); +unix-20210423.tex: printf ("Hello, world!\n"); +unix-20210423.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"} +cassini/home/peter/bo/2021ss/bs/20210423> grep "[Hh][a-z]llo" * +grep: test: Ist ein Verzeichnis +test-1.c: printf ("Hello, world!\n"); +test-2.c: printf ("Hello, world!\n"); +unix-20210423.tex: printf ("Hello, world!\n"); +unix-20210423.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"} +unix-20210423.tex: Programm im aktuellen Verzeichnis aufrufen: \lstinline[style=cmd]{./hello} +unix-20210423.tex: Datei ausgeben: \lstinline[style=cmd]{cat hello.c} +unix-20210423.tex: Datei anzeigen: \lstinline[style=cmd]{less hello.c} +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/grep-2.txt b/20210423/grep-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..2a80ca2380598ac462abf0d8da3b4271d51b50b8 --- /dev/null +++ b/20210423/grep-2.txt @@ -0,0 +1,26 @@ +cassini/home/peter/bo/2021ss/bs/20210423> grep -i "H[ae]llo" * +grep-1.txt:cassini/home/peter/bo/2021ss/bs/20210423> grep Hello * +grep-1.txt:test-1.c: printf ("Hello, world!\n"); +grep-1.txt:test-2.c: printf ("Hello, world!\n"); +grep-1.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep-1.txt:unix-20210423.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"} +grep-1.txt:test-1.c: printf ("Hello, world!\n"); +grep-1.txt:test-2.c: printf ("Hello, world!\n"); +grep-1.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep-1.txt:unix-20210423.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"} +grep-1.txt:test-1.c: printf ("Hello, world!\n"); +grep-1.txt:test-2.c: printf ("Hello, world!\n"); +grep-1.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep-1.txt:unix-20210423.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"} +grep-1.txt:unix-20210423.tex: Programm im aktuellen Verzeichnis aufrufen: \lstinline[style=cmd]{./hello} +grep-1.txt:unix-20210423.tex: Datei ausgeben: \lstinline[style=cmd]{cat hello.c} +grep-1.txt:unix-20210423.tex: Datei anzeigen: \lstinline[style=cmd]{less hello.c} +grep: test: Ist ein Verzeichnis +test-1.c: printf ("Hello, world!\n"); +test-2.c: printf ("Hello, world!\n"); +unix-20210423.tex: printf ("Hello, world!\n"); +unix-20210423.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"} +unix-20210423.tex: Programm im aktuellen Verzeichnis aufrufen: \lstinline[style=cmd]{./hello} +unix-20210423.tex: Datei ausgeben: \lstinline[style=cmd]{cat hello.c} +unix-20210423.tex: Datei anzeigen: \lstinline[style=cmd]{less hello.c} +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/grep-3.txt b/20210423/grep-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..f88ade45ccb68507fb5df7a99948d6908149670b --- /dev/null +++ b/20210423/grep-3.txt @@ -0,0 +1,36 @@ +cassini/home/peter/bo/2021ss/bs/20210423> grep printf * +grep-1.txt:test-1.c: printf ("Hello, world!\n"); +grep-1.txt:test-2.c: printf ("Hello, world!\n"); +grep-1.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep-1.txt:test-1.c: printf ("Hello, world!\n"); +grep-1.txt:test-2.c: printf ("Hello, world!\n"); +grep-1.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep-1.txt:test-1.c: printf ("Hello, world!\n"); +grep-1.txt:test-2.c: printf ("Hello, world!\n"); +grep-1.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep-2.txt:grep-1.txt:test-1.c: printf ("Hello, world!\n"); +grep-2.txt:grep-1.txt:test-2.c: printf ("Hello, world!\n"); +grep-2.txt:grep-1.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep-2.txt:grep-1.txt:test-1.c: printf ("Hello, world!\n"); +grep-2.txt:grep-1.txt:test-2.c: printf ("Hello, world!\n"); +grep-2.txt:grep-1.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep-2.txt:grep-1.txt:test-1.c: printf ("Hello, world!\n"); +grep-2.txt:grep-1.txt:test-2.c: printf ("Hello, world!\n"); +grep-2.txt:grep-1.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep-2.txt:test-1.c: printf ("Hello, world!\n"); +grep-2.txt:test-2.c: printf ("Hello, world!\n"); +grep-2.txt:unix-20210423.tex: printf ("Hello, world!\n"); +grep: test: Ist ein Verzeichnis +test-1.c: printf ("Hello, world!\n"); +test-2.c: printf ("Hello, world!\n"); +unix-20210423.tex: printf ("Hello, world!\n"); +unix-20210423.tex: cassini/.../ainf/20131031.0> ¡grep printf *.c¿ +unix-20210423.tex: philosophy.c: printf ("The answer is %d.\n", answer ()); +cassini/home/peter/bo/2021ss/bs/20210423> grep "^printf" * +grep: test: Ist ein Verzeichnis +cassini/home/peter/bo/2021ss/bs/20210423> grep -R "^printf" * +cassini/home/peter/bo/2021ss/bs/20210423> grep -R "^ *printf" * +test-1.c: printf ("Hello, world!\n"); +test-2.c: printf ("Hello, world!\n"); +unix-20210423.tex: printf ("Hello, world!\n"); +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/grep-4.txt b/20210423/grep-4.txt new file mode 100644 index 0000000000000000000000000000000000000000..daf3938a688b451f09472da0c47bd349ca191d21 --- /dev/null +++ b/20210423/grep-4.txt @@ -0,0 +1,95 @@ +cassini/home/peter/bo/2021ss/bs/20210423> grep 2013 unix-20210423.tex +% Copyright (C) 2013, 2015, 2016, 2017, 2018, 2021 Peter Gerwinski + ./2013ss/net/script/slides/net-probeklausur-20120712.tex + ./2013ss/net/20130924.0/net-klausur-20130924.tex + ./2012ss/hs/20130318.0/hs-klausur-20130318.tex + 2011ws 2012ws 2013ws doc misc projekte + 2012ss 2013ss briefe material orga + cassini/home/peter/bo/2013ss/net/script> ¡cd /usr/bin¿ + cassini/.../ainf/20131031.0> ¡grep printf *.c¿ + phoenix/home/peter/bo/2013ws/ainf/20131031.0> ¡ls -l¿ + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡cat test¿ + ls -l systech-20131008.* + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡chmod +x test¿ + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡ls -l test¿ + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡./test¿ + -rw-r--r-- 1 peter peter 4120 Okt 6 16:44 systech-20131008.aux + ./20131031.0/orbit-x.c + ./20131031.0/orbit-x1.c + ./20131031.0/orbit-x + ./20131107.0/orbit-x.c + ./20131107.0/orbit-x1.c + ./20131107.0/orbit-x + ./20131031.0/orbit-x + ./20131107.0/orbit-x + -rwxr-xr-x 1 peter peter 15831 Okt 31 13:19 ./20131031.0/orbit-x + -rwxr-xr-x 1 peter peter 15831 Okt 31 13:19 ./20131107.0/orbit-x + rtech-20131002.pdf + -rw-r--r-- 1 peter peter 6753149 Okt 1 22:59 rtech-20131002.pdf +cassini/home/peter/bo/2021ss/bs/20210423> +cassini/home/peter/bo/2021ss/bs/20210423> grep 2013 unix-20210423.tex +% Copyright (C) 2013, 2015, 2016, 2017, 2018, 2021 Peter Gerwinski + ./2013ss/net/script/slides/net-probeklausur-20120712.tex + ./2013ss/net/20130924.0/net-klausur-20130924.tex + ./2012ss/hs/20130318.0/hs-klausur-20130318.tex + 2011ws 2012ws 2013ws doc misc projekte + 2012ss 2013ss briefe material orga + cassini/home/peter/bo/2013ss/net/script> ¡cd /usr/bin¿ + cassini/.../ainf/20131031.0> ¡grep printf *.c¿ + phoenix/home/peter/bo/2013ws/ainf/20131031.0> ¡ls -l¿ + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡cat test¿ + ls -l systech-20131008.* + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡chmod +x test¿ + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡ls -l test¿ + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡./test¿ + -rw-r--r-- 1 peter peter 4120 Okt 6 16:44 systech-20131008.aux + ./20131031.0/orbit-x.c + ./20131031.0/orbit-x1.c + ./20131031.0/orbit-x + ./20131107.0/orbit-x.c + ./20131107.0/orbit-x1.c + ./20131107.0/orbit-x + ./20131031.0/orbit-x + ./20131107.0/orbit-x + -rwxr-xr-x 1 peter peter 15831 Okt 31 13:19 ./20131031.0/orbit-x + -rwxr-xr-x 1 peter peter 15831 Okt 31 13:19 ./20131107.0/orbit-x + rtech-20131002.pdf + -rw-r--r-- 1 peter peter 6753149 Okt 1 22:59 rtech-20131002.pdf +cassini/home/peter/bo/2021ss/bs/20210423> grep "2013[01][0-9][0-3][0-9].[a-z]*" unix-20210423.tex + ./2013ss/net/20130924.0/net-klausur-20130924.tex + ./2012ss/hs/20130318.0/hs-klausur-20130318.tex + cassini/.../ainf/20131031.0> ¡grep printf *.c¿ + phoenix/home/peter/bo/2013ws/ainf/20131031.0> ¡ls -l¿ + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡cat test¿ + ls -l systech-20131008.* + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡chmod +x test¿ + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡ls -l test¿ + cassini/home/peter/bo/2013ws/systech/20131008.0> ¡./test¿ + -rw-r--r-- 1 peter peter 4120 Okt 6 16:44 systech-20131008.aux + ./20131031.0/orbit-x.c + ./20131031.0/orbit-x1.c + ./20131031.0/orbit-x + ./20131107.0/orbit-x.c + ./20131107.0/orbit-x1.c + ./20131107.0/orbit-x + ./20131031.0/orbit-x + ./20131107.0/orbit-x + -rwxr-xr-x 1 peter peter 15831 Okt 31 13:19 ./20131031.0/orbit-x + -rwxr-xr-x 1 peter peter 15831 Okt 31 13:19 ./20131107.0/orbit-x + rtech-20131002.pdf + -rw-r--r-- 1 peter peter 6753149 Okt 1 22:59 rtech-20131002.pdf +cassini/home/peter/bo/2021ss/bs/20210423> grep "[a-z-]*-2013[01][0-9][0-3][0-9].[a-z]*" unix-20210423.tex + ./2013ss/net/20130924.0/net-klausur-20130924.tex + ./2012ss/hs/20130318.0/hs-klausur-20130318.tex + ls -l systech-20131008.* + -rw-r--r-- 1 peter peter 4120 Okt 6 16:44 systech-20131008.aux + rtech-20131002.pdf + -rw-r--r-- 1 peter peter 6753149 Okt 1 22:59 rtech-20131002.pdf +cassini/home/peter/bo/2021ss/bs/20210423> grep -o "[a-z-]*-2013[01][0-9][0-3][0-9].[a-z]*" unix-20210423.tex +net-klausur-20130924.tex +hs-klausur-20130318.tex +systech-20131008. +systech-20131008.aux +rtech-20131002.pdf +rtech-20131002.pdf +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/grep-5.txt b/20210423/grep-5.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b3c701f797a93de86e7e389148d1dfffe545a5b --- /dev/null +++ b/20210423/grep-5.txt @@ -0,0 +1,26 @@ +cassini/home/peter/bo/2021ss/bs/20210423> grep -o "[a-z-]*-2013[01][0-9][0-3][0-9].[a-z]*" unix-20210423.tex +net-klausur-20130924.tex +hs-klausur-20130318.tex +systech-20131008. +systech-20131008.aux +rtech-20131002.pdf +rtech-20131002.pdf +cassini/home/peter/bo/2021ss/bs/20210423> grep -o "[a-z-]*-2013[01][0-9][0-3][0-9].[a-z][a-z]*" unix-20210423.tex +net-klausur-20130924.tex +hs-klausur-20130318.tex +systech-20131008.aux +rtech-20131002.pdf +rtech-20131002.pdf +cassini/home/peter/bo/2021ss/bs/20210423> grep -o "[a-z-]*-2013[01][0-9][0-3][0-9].[a-z]\+" unix-20210423.tex +net-klausur-20130924.tex +hs-klausur-20130318.tex +systech-20131008.aux +rtech-20131002.pdf +rtech-20131002.pdf +cassini/home/peter/bo/2021ss/bs/20210423> grep -E -o "[a-z-]*-2013[01][0-9][0-3][0-9].[a-z]+" unix-20210423.tex +net-klausur-20130924.tex +hs-klausur-20130318.tex +systech-20131008.aux +rtech-20131002.pdf +rtech-20131002.pdf +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/hello-error.txt b/20210423/hello-error.txt new file mode 100644 index 0000000000000000000000000000000000000000..7a3e3a6323b5d989be3bbbe96f45e6d4fc8e47fe --- /dev/null +++ b/20210423/hello-error.txt @@ -0,0 +1 @@ +grep: test: Ist ein Verzeichnis diff --git a/20210423/hello-files-and-error.txt b/20210423/hello-files-and-error.txt new file mode 100644 index 0000000000000000000000000000000000000000..b0b29831cd4b26cd684768828693d85ba98be314 --- /dev/null +++ b/20210423/hello-files-and-error.txt @@ -0,0 +1,9 @@ +grep-1.txt +grep-2.txt +grep-3.txt +iostreams-3.txt +iostreams-4.txt +grep: test: Ist ein Verzeichnis +test-1.c +test-2.c +unix-20210423.tex diff --git a/20210423/hello-files.txt b/20210423/hello-files.txt new file mode 100644 index 0000000000000000000000000000000000000000..3dd40b28f78abd44ab7b51bdaebb797cb9600b5d --- /dev/null +++ b/20210423/hello-files.txt @@ -0,0 +1,6 @@ +grep-1.txt +grep-2.txt +grep-3.txt +test-1.c +test-2.c +unix-20210423.tex diff --git a/20210423/if-1.txt b/20210423/if-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..3e8cf4e13e86960215f0b93c0cea0faa0390741c --- /dev/null +++ b/20210423/if-1.txt @@ -0,0 +1,4 @@ +cassini/home/peter/bo/2021ss/bs/20210423> file_template=$(ls -rt *.c *.cpp *.sh *.py *.tex *.diff 2>/dev/null | tail -1) +cassini/home/peter/bo/2021ss/bs/20210423> echo $file_template +params-3.sh +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/if-2.txt b/20210423/if-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..635b5dfa33342183953e2083727af58ce5423eb4 --- /dev/null +++ b/20210423/if-2.txt @@ -0,0 +1,17 @@ +#include <stdio.h> + +int main (void) +{ + printf ("Bonjour le monde !\n"); + return 1; +} +cassini/home/peter/bo/2021ss/bs/20210423> gcc -Wall -O test-5.c -o test-5 +cassini/home/peter/bo/2021ss/bs/20210423> ./test-5 +Bonjour le monde ! +cassini/home/peter/bo/2021ss/bs/20210423> if ./test-5; then echo "Merci."; else echo "C'est dommage."; fi +Bonjour le monde ! +C'est dommage. +cassini/home/peter/bo/2021ss/bs/20210423> if ./test-4; then echo "Merci."; else echo "C'est dommage."; fi +Bonjour le monde ! +Merci. +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/if-3.txt b/20210423/if-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..ee2a3d913c0b3dea7e62ab80d8ea91ff9f22ef91 --- /dev/null +++ b/20210423/if-3.txt @@ -0,0 +1,16 @@ +#include <stdio.h> + +int main (void) +{ + printf ("Bonjour le monde !\n") + return 1 +} +cassini/home/peter/bo/2021ss/bs/20210423> gcc -Wall -O test-6.c -o test-6 && ./test-6 +test-6.c: In function ‘main’: +test-6.c:5:34: error: expected ‘;’ before ‘return’ + printf ("Bonjour le monde !\n") + ^ + ; + return 1 + ~~~~~~ +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/if-4.txt b/20210423/if-4.txt new file mode 100644 index 0000000000000000000000000000000000000000..a458917ec947aa22e0a63ec11117506e7872cd04 --- /dev/null +++ b/20210423/if-4.txt @@ -0,0 +1,9 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo $USER +peter +cassini/home/peter/bo/2021ss/bs/20210423> if [ "$USER" = "peter" ]; then echo "Hallo, Peter!"; else echo "Hallo, wer auch immer!"; fi +Hallo, Peter! +cassini/home/peter/bo/2021ss/bs/20210423> echo $DISPLAY +:5 +cassini/home/peter/bo/2021ss/bs/20210423> if [ -n "$DISPLAY" ]; then xeyes; else echo "Keine Grafik!"; fi +Beendet +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/input-1.txt b/20210423/input-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..87d825ae4e2adf20e628e84b07e7142fac249ae8 --- /dev/null +++ b/20210423/input-1.txt @@ -0,0 +1,13 @@ +cassini/home/peter/bo/2021ss/bs/20210423> del *wichtig* +unwichtig-1.txt unwichtig-3.txt unwichtig-5.txt unwichtig-7.txt +unwichtig-2.txt unwichtig-4.txt unwichtig-6.txt +Press ENTER to delete, ^C to abort. +cassini/home/peter/bo/2021ss/bs/20210423> which del +/home/peter/usr/bin/del +cassini/home/peter/bo/2021ss/bs/20210423> cat $(which del) +#!/bin/sh +ls "$@" +echo -n "Press ENTER to delete, ^C to abort." +read junk +rm "$@" +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/input-2.txt b/20210423/input-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..5efddfaa5b27bc90bc5abc5c47a4d2dc0739366c --- /dev/null +++ b/20210423/input-2.txt @@ -0,0 +1,5 @@ +cassini/home/peter/bo/2021ss/bs/20210423> read name +Peter +cassini/home/peter/bo/2021ss/bs/20210423> echo "Hallo, $name!" +Hallo, Peter! +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/iostreams-1.txt b/20210423/iostreams-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..817f3fdaa6508d437ad2a90bace2475009d1c08b --- /dev/null +++ b/20210423/iostreams-1.txt @@ -0,0 +1,4 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo "Dies ist ein Test." > test.txt +cassini/home/peter/bo/2021ss/bs/20210423> cat test.txt +Dies ist ein Test. +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/iostreams-2.txt b/20210423/iostreams-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..7257290e423d184a5a70fa4eea36b070c49e986a --- /dev/null +++ b/20210423/iostreams-2.txt @@ -0,0 +1,5 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo "Dies auch." >> test.txt +cassini/home/peter/bo/2021ss/bs/20210423> cat test.txt +Dies ist ein Test. +Dies auch. +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/iostreams-3.txt b/20210423/iostreams-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..9d143b406ba97ec0878c30ff2fc40a0619ea7383 --- /dev/null +++ b/20210423/iostreams-3.txt @@ -0,0 +1,18 @@ +cassini/home/peter/bo/2021ss/bs/20210423> grep -l Hello * +grep-1.txt +grep-2.txt +grep-3.txt +grep: test: Ist ein Verzeichnis +test-1.c +test-2.c +unix-20210423.tex +cassini/home/peter/bo/2021ss/bs/20210423> grep -l Hello * > hello-files.txt +grep: test: Ist ein Verzeichnis +cassini/home/peter/bo/2021ss/bs/20210423> cat hello-files.txt +grep-1.txt +grep-2.txt +grep-3.txt +test-1.c +test-2.c +unix-20210423.tex +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/iostreams-4.txt b/20210423/iostreams-4.txt new file mode 100644 index 0000000000000000000000000000000000000000..e4c57d3fdc6d5a09317b409627de2380bbc6c360 --- /dev/null +++ b/20210423/iostreams-4.txt @@ -0,0 +1,20 @@ +cassini/home/peter/bo/2021ss/bs/20210423> grep -l Hello * +grep-1.txt +grep-2.txt +grep-3.txt +iostreams-3.txt +grep: test: Ist ein Verzeichnis +test-1.c +test-2.c +unix-20210423.tex +cassini/home/peter/bo/2021ss/bs/20210423> grep -l Hello * 2> hello-error.txt +grep-1.txt +grep-2.txt +grep-3.txt +iostreams-3.txt +test-1.c +test-2.c +unix-20210423.tex +cassini/home/peter/bo/2021ss/bs/20210423> cat hello-error.txt +grep: test: Ist ein Verzeichnis +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/iostreams-5.txt b/20210423/iostreams-5.txt new file mode 100644 index 0000000000000000000000000000000000000000..e8b40291644f11d7407fdc3ca0114a778f36c070 --- /dev/null +++ b/20210423/iostreams-5.txt @@ -0,0 +1,12 @@ +cassini/home/peter/bo/2021ss/bs/20210423> grep -l Hello * > hello-files-and-error.txt 2>&1 +cassini/home/peter/bo/2021ss/bs/20210423> cat hello-files-and-error.txt +grep-1.txt +grep-2.txt +grep-3.txt +iostreams-3.txt +iostreams-4.txt +grep: test: Ist ein Verzeichnis +test-1.c +test-2.c +unix-20210423.tex +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/iostreams-6.txt b/20210423/iostreams-6.txt new file mode 100644 index 0000000000000000000000000000000000000000..08385ba4fcc8591c2133355f67cbd70e5a2ae94d --- /dev/null +++ b/20210423/iostreams-6.txt @@ -0,0 +1,3 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo 'Fehler!!!' 1>&2 +Fehler!!! +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/iostreams-7.txt b/20210423/iostreams-7.txt new file mode 100644 index 0000000000000000000000000000000000000000..ca5f11b88d5f942f3099343d5cd275c3f8543720 --- /dev/null +++ b/20210423/iostreams-7.txt @@ -0,0 +1,4 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" > "test.bc" +cassini/home/peter/bo/2021ss/bs/20210423> bc < test.bc +4 +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/iostreams-8.txt b/20210423/iostreams-8.txt new file mode 100644 index 0000000000000000000000000000000000000000..e21ca489f3d9c6a2fa8b1fad86b27bd046ddbcdb --- /dev/null +++ b/20210423/iostreams-8.txt @@ -0,0 +1,3 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | bc +4 +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/iostreams-9.txt b/20210423/iostreams-9.txt new file mode 100644 index 0000000000000000000000000000000000000000..332ab2c296dd28a2aac6985bddeb6dfc56242bbf --- /dev/null +++ b/20210423/iostreams-9.txt @@ -0,0 +1,10 @@ +cassini/home/peter/bo/2021ss/bs/20210423> ls -rt *.c *.cpp *.sh *.py *.tex *.diff ls: Zugriff auf '*.cpp' nicht möglich: Datei oder Verzeichnis nicht gefunden +ls: Zugriff auf '*.py' nicht möglich: Datei oder Verzeichnis nicht gefunden +ls: Zugriff auf '*.diff' nicht möglich: Datei oder Verzeichnis nicht gefunden + unix-20210423.tex test-1.c test-4.c params-2.sh + test-2.c test-3.c params-1.sh params-3.sh +cassini/home/peter/bo/2021ss/bs/20210423> ls -rt *.c *.cpp *.sh *.py *.tex *.diff 2>/dev/null unix-20210423.tex test-1.c test-4.c params-2.sh + test-2.c test-3.c params-1.sh params-3.sh +cassini/home/peter/bo/2021ss/bs/20210423> ls -l /dev/null +crw-rw-rw- 1 root root 1, 3 Apr 6 09:59 /dev/null +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/params-1.sh b/20210423/params-1.sh new file mode 100755 index 0000000000000000000000000000000000000000..89423aeae1bb6246e6d0c5acd58991227648b97b --- /dev/null +++ b/20210423/params-1.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo $1 diff --git a/20210423/params-1.txt b/20210423/params-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..99bfcff2538974d2105920485a213c4c663a2a3c --- /dev/null +++ b/20210423/params-1.txt @@ -0,0 +1,17 @@ +#!/bin/bash + +echo $1 +cassini/home/peter/bo/2021ss/bs/20210423> chmod 111 params-1.sh +cassini/home/peter/bo/2021ss/bs/20210423> ./params-1.sh +/bin/bash: ./params-1.sh: Keine Berechtigung +cassini/home/peter/bo/2021ss/bs/20210423> chmod 555 params-1.sh +cassini/home/peter/bo/2021ss/bs/20210423> ./params-1.sh + +cassini/home/peter/bo/2021ss/bs/20210423> ./params-1.sh Foo +Foo +cassini/home/peter/bo/2021ss/bs/20210423> ./params-1.sh Foo Bar Baz +Foo +cassini/home/peter/bo/2021ss/bs/20210423> chmod 755 params-1.sh +cassini/home/peter/bo/2021ss/bs/20210423> ./params-1.sh Pruzzel Proe +Pruzzel +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/params-2.sh b/20210423/params-2.sh new file mode 100755 index 0000000000000000000000000000000000000000..7102914424002091e56660128cb4bfe1410e9117 --- /dev/null +++ b/20210423/params-2.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +shift +echo $1 diff --git a/20210423/params-2.txt b/20210423/params-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..c6d85aaf63a686ea9737a9d54ee8e63cfc7f3095 --- /dev/null +++ b/20210423/params-2.txt @@ -0,0 +1,9 @@ +#!/bin/bash + +shift 2 +echo $1 +cassini/home/peter/bo/2021ss/bs/20210423> ./params-2.sh Foo Bar Baz +Bar +cassini/home/peter/bo/2021ss/bs/20210423> ./params-2.sh Foo Bar Baz Pruzzel Proe +Bar +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/params-3.sh b/20210423/params-3.sh new file mode 100755 index 0000000000000000000000000000000000000000..a21f4a7afd3fa8d2c4b63e57f46cdd3433697322 --- /dev/null +++ b/20210423/params-3.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +shift 2 +echo $1 diff --git a/20210423/permissions-1.txt b/20210423/permissions-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..7753ba766a0746572d1bbc91782f6e6868c8120a --- /dev/null +++ b/20210423/permissions-1.txt @@ -0,0 +1,8 @@ +cassini/home/peter/bo/2021ss/bs/20210423> cd test +cassini/home/peter/bo/2021ss/bs/20210423/test> cd .. +cassini/home/peter/bo/2021ss/bs/20210423> chmod -x test +cassini/home/peter/bo/2021ss/bs/20210423> cd test +bash: cd: test: Keine Berechtigung +cassini/home/peter/bo/2021ss/bs/20210423> chmod +x test +cassini/home/peter/bo/2021ss/bs/20210423> cd test +cassini/home/peter/bo/2021ss/bs/20210423/test> diff --git a/20210423/pipes-1.txt b/20210423/pipes-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..52e61e32cdf3dbe16dcc2dc289d61bcb519472e6 --- /dev/null +++ b/20210423/pipes-1.txt @@ -0,0 +1,5 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/g' | bc +8 +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/g' | bc +8 +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/pipes-2.txt b/20210423/pipes-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..1297679515178283114f974cc27601bd871b2646 --- /dev/null +++ b/20210423/pipes-2.txt @@ -0,0 +1,6 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/' | bc 6 +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/' +4 + 2 +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/g' +4 + 4 +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/pipes-3.txt b/20210423/pipes-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..0b875199efc3fd84a2990dd328c837653ee304f7 --- /dev/null +++ b/20210423/pipes-3.txt @@ -0,0 +1,12 @@ +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/g' +4 + 4 +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/g' | gzip +gzip: compressed data not written to a terminal. Use -f to force compression. +For help, type: gzip -h +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/g' | gzip | gunzip +4 + 4 +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/g' | gzip | gunzip | bc +8 +cassini/home/peter/bo/2021ss/bs/20210423> echo "2 + 2" | sed -e 's/2/4/g' | gzip | gunzip | sed -e 's/4/3/g' | bc +6 +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/pipes-4.txt b/20210423/pipes-4.txt new file mode 100644 index 0000000000000000000000000000000000000000..575936dd9c4052de1f7c356eacb0bd400465b8c7 --- /dev/null +++ b/20210423/pipes-4.txt @@ -0,0 +1,6 @@ + 2142 find ~/bo/ -type f -name "*klausur*.pdf" + 2143 find ~/bo/ -type f -name "*klausur*.pdf" | grep "-fig[0-9]" + 2144 find ~/bo/ -type f -name "*klausur*.pdf" | grep "\-fig[0-9]" + 2145 find ~/bo/ -type f -name "*klausur*.pdf" | grep -v "\-fig[0-9]" + 2146 ls $(find ~/bo/ -type f -name "*klausur*.pdf" | grep -v "\-fig[0-9]") + 2147 zip -9 klausuren.zip $(find ~/bo/ -type f -name "*klausur*.pdf" | grep -v "\-fig[0-9]") diff --git a/20210423/pipes-5.txt b/20210423/pipes-5.txt new file mode 100644 index 0000000000000000000000000000000000000000..72529eecee6184f661445369ca67be8674070d40 --- /dev/null +++ b/20210423/pipes-5.txt @@ -0,0 +1,14 @@ +cassini/home/peter/bo/2021ss/bs/20210423> ls -rt *.c *.cpp *.sh *.py *.tex *.diff 2>/dev/null unix-20210423.tex test-1.c test-4.c params-2.sh + test-2.c test-3.c params-1.sh params-3.sh +cassini/home/peter/bo/2021ss/bs/20210423> ls -rt *.c *.cpp *.sh *.py *.tex *.diff 2>/dev/null | cat +unix-20210423.tex +test-2.c +test-1.c +test-3.c +test-4.c +params-1.sh +params-2.sh +params-3.sh +cassini/home/peter/bo/2021ss/bs/20210423> ls -rt *.c *.cpp *.sh *.py *.tex *.diff 2>/dev/null | tail -1 +params-3.sh +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/sed-1.txt b/20210423/sed-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..412c17d0eacee74c1e535766c846509c00f8f385 --- /dev/null +++ b/20210423/sed-1.txt @@ -0,0 +1,7 @@ +cassini/home/peter/bo/2021ss/bs/20210423> file_template=$(ls -rt *.c *.cpp *.sh *.py *.tex *.diff 2>/dev/null | tail -1) +cassini/home/peter/bo/2021ss/bs/20210423> echo $file_template test-6.c +cassini/home/peter/bo/2021ss/bs/20210423> echo $file_template | sed -e 's/.*\.\(.*$\)/\1/' +c +cassini/home/peter/bo/2021ss/bs/20210423> echo $file_template | sed -e 's/\(.*\)\..*$/\1/' +test-6 +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/test-1.c b/20210423/test-1.c new file mode 100644 index 0000000000000000000000000000000000000000..b19d80e9bd0bd7c5ed8f54b20c6a50d9166f03ac --- /dev/null +++ b/20210423/test-1.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main (void) +{ + printf ("Hello, world!\n"); + return 0; +} diff --git a/20210423/test-2.c b/20210423/test-2.c new file mode 100644 index 0000000000000000000000000000000000000000..b19d80e9bd0bd7c5ed8f54b20c6a50d9166f03ac --- /dev/null +++ b/20210423/test-2.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main (void) +{ + printf ("Hello, world!\n"); + return 0; +} diff --git a/20210423/test-3.c b/20210423/test-3.c new file mode 100644 index 0000000000000000000000000000000000000000..b12567c05cf7cf3d7b90f0f22635e78c3bcb6819 --- /dev/null +++ b/20210423/test-3.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main (void) +{ + printf ("Hallo, world!\n"); + return 0; +} diff --git a/20210423/test-4.c b/20210423/test-4.c new file mode 100644 index 0000000000000000000000000000000000000000..c79c1c33e2c85d817fe9abfe7f6f52f4cde29996 --- /dev/null +++ b/20210423/test-4.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main (void) +{ + printf ("Bonjour le monde !\n"); + return 0; +} diff --git a/20210423/test-5.c b/20210423/test-5.c new file mode 100644 index 0000000000000000000000000000000000000000..5f428754dd482e6044245d267994223e04856f6f --- /dev/null +++ b/20210423/test-5.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main (void) +{ + printf ("Bonjour le monde !\n"); + return 1; +} diff --git a/20210423/test-6.c b/20210423/test-6.c new file mode 100644 index 0000000000000000000000000000000000000000..08ad6a1254fc4d660e24087fa401156bde9245da --- /dev/null +++ b/20210423/test-6.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main (void) +{ + printf ("Bonjour le monde !\n") + return 1 +} diff --git a/20210423/test.bc b/20210423/test.bc new file mode 100644 index 0000000000000000000000000000000000000000..a922b775b5315bf2bc04d96cbdaba8d32c911404 --- /dev/null +++ b/20210423/test.bc @@ -0,0 +1 @@ +2 + 2 diff --git a/20210423/test.txt b/20210423/test.txt new file mode 100644 index 0000000000000000000000000000000000000000..25cd896083bf6c919d1d2b70b8b06122e72cf5ca --- /dev/null +++ b/20210423/test.txt @@ -0,0 +1,2 @@ +Dies ist ein Test. +Dies auch. diff --git a/20210423/unix-20210423.pdf b/20210423/unix-20210423.pdf new file mode 120000 index 0000000000000000000000000000000000000000..5088e123b7cf3a13f3e818d8be9c5b5c70f0b056 --- /dev/null +++ b/20210423/unix-20210423.pdf @@ -0,0 +1 @@ +../20210409/unix-20210409.pdf \ No newline at end of file diff --git a/20210423/unix-20210423.tex b/20210423/unix-20210423.tex new file mode 120000 index 0000000000000000000000000000000000000000..8548cff5b6f4928e1bacf91d66f0f6d1ed4966da --- /dev/null +++ b/20210423/unix-20210423.tex @@ -0,0 +1 @@ +../20210409/unix-20210409.tex \ No newline at end of file diff --git a/20210423/vic b/20210423/vic new file mode 100755 index 0000000000000000000000000000000000000000..063daa1366b11b0914121af554892a2e2c68183f --- /dev/null +++ b/20210423/vic @@ -0,0 +1,39 @@ +#!/bin/bash + +debug=false + +if [ $# -gt 0 ]; then + $debug && echo "parameters = $@" + shift $(( $# - 1 )) + file_template="$1" +else + file_template=$(ls -rt *.c *.cpp *.sh *.py *.tex *.diff 2>/dev/null | tail -1) +fi + +$debug && echo "file_template = $file_template" + +file_extension=$(echo $file_template | sed -e 's/.*\.\(.*$\)/\1/') +file_base=$(echo $file_template | sed -e 's/\(.*\)\..*$/\1/') + +$debug && echo "file_extension = $file_extension" +$debug && echo "file_base = $file_base" + +file_number=$(echo $file_base | sed -e 's/^.*-\([0-9]*$\)/\1/') +file_stem=$(echo $file_base | sed -e 's/^\(.*\)-[0-9]*$/\1/') + +$debug && echo "file_number = $file_number" +$debug && echo "file_number = $file_stem" + +while [ -e "$file_stem-$file_number.$file_extension" ]; do + file_number=$((file_number + 1)) +done +new_file_name="$file_stem-$file_number.$file_extension" + +$debug && echo "new_file_name = $new_file_name" && read junk + +cp -pi "$file_template" "$new_file_name" +#$EDITOR "$new_file_name" +/usr/bin/vim -X -c 'set sw=2' -c 'set expandtab' -c 'set ai' -c 'set nowrap' \ + "$new_file_name" +clear +cat "$new_file_name" diff --git a/20210423/vicat b/20210423/vicat new file mode 100755 index 0000000000000000000000000000000000000000..c3565c648e9320f871f275b135cef86d4c918ebd --- /dev/null +++ b/20210423/vicat @@ -0,0 +1,5 @@ +#!/bin/bash +/usr/bin/vim -X -c 'set sw=2' -c 'set expandtab' -c 'set ai' -c 'set nowrap' "$@" +clear +shift $(( $# - 1 )) +cat "$1" diff --git a/20210423/while-1.txt b/20210423/while-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..a4492468164b8eac520137d6b0ee2fee75d73b29 --- /dev/null +++ b/20210423/while-1.txt @@ -0,0 +1,9 @@ +cassini/home/peter/bo/2021ss/bs/20210423> while true; do echo "Hello, world!"; sleep 1; done +Hello, world! +Hello, world! +Hello, world! +Hello, world! +Hello, world! +Hello, world! +^C +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/while-2.txt b/20210423/while-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..3920a02af05ba9acec1de7c974d48d2f58a78fc9 --- /dev/null +++ b/20210423/while-2.txt @@ -0,0 +1,11 @@ +cassini/home/peter/bo/2021ss/bs/20210423> while 1 < 2; do echo "Hello, world!"; sleep 1; done +bash: 2: Datei oder Verzeichnis nicht gefunden +cassini/home/peter/bo/2021ss/bs/20210423> while [[ 1 < 2 ]]; do echo "Hello, world!"; sleep 1; done +Hello, world! +Hello, world! +Hello, world! +Hello, world! +Hello, world! +Hello, world! +^C +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/while-3.txt b/20210423/while-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..d90662084ec2f492a2ad34962b95b337e4892961 --- /dev/null +++ b/20210423/while-3.txt @@ -0,0 +1,5 @@ +cassini/home/peter/bo/2021ss/bs/20210423> while [[ 1 ]]; do echo "Hello, world!"; sleep 1; doneHello, world! +Hello, world! +Hello, world! +^C +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/wildcards-1.txt b/20210423/wildcards-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..be63f871cba519dea269f74017800e6f6ebe0284 --- /dev/null +++ b/20210423/wildcards-1.txt @@ -0,0 +1,19 @@ +cassini/home/peter/bo/2021ss/bs/20210423> touch test-1.c test-2.c +cassini/home/peter/bo/2021ss/bs/20210423> ls -lrt +insgesamt 0 +lrwxrwxrwx 1 peter peter 29 Apr 16 10:19 unix-20210423.pdf -> ../20210409/unix-20210409.pdf +lrwxrwxrwx 1 peter peter 29 Apr 16 12:06 unix-20210423.tex -> ../20210409/unix-20210409.tex +-rw-r--r-- 1 peter peter 0 Apr 23 11:34 test-2.c +-rw-r--r-- 1 peter peter 0 Apr 23 11:34 test-1.c +cassini/home/peter/bo/2021ss/bs/20210423> mkdir test +cassini/home/peter/bo/2021ss/bs/20210423> cd test/ +cassini/home/peter/bo/2021ss/bs/20210423/test> mv ../test*.c +cassini/home/peter/bo/2021ss/bs/20210423/test> ls -l +insgesamt 0 +cassini/home/peter/bo/2021ss/bs/20210423/test> ls -l .. +insgesamt 4 +drwxr-xr-x 2 peter peter 4096 Apr 23 11:34 test +-rw-r--r-- 1 peter peter 0 Apr 23 11:34 test-2.c +lrwxrwxrwx 1 peter peter 29 Apr 16 10:19 unix-20210423.pdf -> ../20210409/unix-20210409.pdf +lrwxrwxrwx 1 peter peter 29 Apr 16 12:06 unix-20210423.tex -> ../20210409/unix-20210409.tex +cassini/home/peter/bo/2021ss/bs/20210423/test> diff --git a/20210423/wildcards-2.txt b/20210423/wildcards-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..d42e553e09454a564d0b8da903de9229d75d7c1f --- /dev/null +++ b/20210423/wildcards-2.txt @@ -0,0 +1,22 @@ +cassini/home/peter/bo/2021ss/bs/20210423> ls -l +insgesamt 8 +drwxr-xr-x 2 peter peter 4096 Apr 23 11:37 test +lrwxrwxrwx 1 peter peter 29 Apr 16 10:19 unix-20210423.pdf -> ../20210409/unix-20210409.pdf +lrwxrwxrwx 1 peter peter 29 Apr 16 12:06 unix-20210423.tex -> ../20210409/unix-20210409.tex +-rw-r--r-- 1 peter peter 1045 Apr 23 11:36 wildcards-1.txt +cassini/home/peter/bo/2021ss/bs/20210423> touch test-1.c test-2.c +cassini/home/peter/bo/2021ss/bs/20210423> cd test/ +cassini/home/peter/bo/2021ss/bs/20210423/test> echo mv ../test-*.c +mv ../test-1.c ../test-2.c +cassini/home/peter/bo/2021ss/bs/20210423/test> mv ../test-*.c +cassini/home/peter/bo/2021ss/bs/20210423/test> ls -l +insgesamt 0 +cassini/home/peter/bo/2021ss/bs/20210423/test> cd .. +cassini/home/peter/bo/2021ss/bs/20210423> ls -l +insgesamt 8 +drwxr-xr-x 2 peter peter 4096 Apr 23 11:37 test +-rw-r--r-- 1 peter peter 0 Apr 23 11:37 test-2.c +lrwxrwxrwx 1 peter peter 29 Apr 16 10:19 unix-20210423.pdf -> ../20210409/unix-20210409.pdf +lrwxrwxrwx 1 peter peter 29 Apr 16 12:06 unix-20210423.tex -> ../20210409/unix-20210409.tex +-rw-r--r-- 1 peter peter 1045 Apr 23 11:36 wildcards-1.txt +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/wildcards-3.txt b/20210423/wildcards-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..2ab73de48e5fec561ce24442f5b66935a3a2855a --- /dev/null +++ b/20210423/wildcards-3.txt @@ -0,0 +1,9 @@ +cassini/home/peter/bo/2021ss/bs/20210423> mv -i ../find-*.txt +mv: das angegebene Ziel '../find-5.txt' ist kein Verzeichnis +cassini/home/peter/bo/2021ss/bs/20210423> echo mv -i ../find-*.txt +mv -i ../find-1.txt ../find-2.txt ../find-3.txt ../find-5.txt +cassini/home/peter/bo/2021ss/bs/20210423> echo mv -i ../find-[15].txt +mv -i ../find-1.txt ../find-5.txt +cassini/home/peter/bo/2021ss/bs/20210423> mv -i ../find-[15].txt +mv: '../find-5.txt' überschreiben? n +cassini/home/peter/bo/2021ss/bs/20210423> diff --git a/20210423/xkcd b/20210423/xkcd new file mode 100755 index 0000000000000000000000000000000000000000..9964c95684e445d54fa4d26b6eb096257bed767c --- /dev/null +++ b/20210423/xkcd @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e + +prefix="${1:-xkcd}" +suffix="$2" +url=$(xsel) + +filebase="$prefix-$(echo $url | sed -e 's/^.*\///')" +filename="$filebase$suffix" +orig_filename=$(echo $filename | sed -e 's/\.png$/-orig.png/') +if [ -e "$orig_filename" ]; then + echo -n "$orig_filename exists. Press ENTER to proceed, ^C to abort. " + read junk +fi + +if [ -e "$filename" ]; then + mv "$filename" "$orig_filename" +fi + +if [ "$prefix" = "xkcd" ]; then + url2=$(echo $url | sed -e 's/\.png$/_2x.png/') + filename2=$(echo $filename | sed -e 's/\.png$/_2x.png/') + if [ -e "$filename2" ]; then + echo -n "$filename2 exists. Press ENTER to proceed, ^C to abort. " + read junk + fi + wget "$url" -O "$filename" + wget "$url2" -O "$filename2" + ls -l "$filename" "$filename2" + test -s "$filename2" || rm "$filename2" +else + wget "$url" -O "$filename" + ls -l "$filename" +fi + +if [ -e "$orig_filename" ]; then + if diff "$orig_filename" "$filename"; then + echo "$filename unchanged" + mv "$orig_filename" "$filename" + fi +fi