diff --git a/20220328/for-1.txt b/20220328/for-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..45ea9d90b5a286da356d78be0f26d5b41574481e --- /dev/null +++ b/20220328/for-1.txt @@ -0,0 +1,47 @@ +cassini/home/peter/bo/2022ss/bs/20220314> for x in foo bar baz; do echo $x; done +foo +bar +baz +cassini/home/peter/bo/2022ss/bs/20220314> for x in 1 2 3 4 5 6 7 8 9 10; do echo $x; done +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +cassini/home/peter/bo/2022ss/bs/20220314> for x in $(seq 10); do echo $x; done +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +cassini/home/peter/bo/2022ss/bs/20220314> for x in $(seq -f "%04g" 10); do echo $x; done +0001 +0002 +0003 +0004 +0005 +0006 +0007 +0008 +0009 +0010 +cassini/home/peter/bo/2022ss/bs/20220314> for x in $(seq -f "%04g" 17 23); do echo $x; done +0017 +0018 +0019 +0020 +0021 +0022 +0023 +cassini/home/peter/bo/2022ss/bs/20220314> echo cp -pi $(for x in $(seq -f "image-%04g.jpg" 17 23); do echo $x; done) sonstwohin/ +cp -pi image-0017.jpg image-0018.jpg image-0019.jpg image-0020.jpg image-0021.jpg image-0022.jpg image-0023.jpg sonstwohin/ diff --git a/20220328/for-2.txt b/20220328/for-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..8bd7fa4741af859af1de3b88d53e48cc7d62c4c3 --- /dev/null +++ b/20220328/for-2.txt @@ -0,0 +1,11 @@ +cassini/home/peter/bo/2022ss/bs/20220314> for ((i = 1 ; i <= 10 ; i++)); do echo $i; done +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 diff --git a/20220328/if-0.txt b/20220328/if-0.txt new file mode 100644 index 0000000000000000000000000000000000000000..eebd06ef7ccfc35b6878d2d7b5cbe4be5ae14b8c --- /dev/null +++ b/20220328/if-0.txt @@ -0,0 +1,11 @@ +cassini/home/peter/bo/2022ss/bs/20220314> cat test.txt +Test +cassini/home/peter/bo/2022ss/bs/20220314> grep Test test.txt +Test +cassini/home/peter/bo/2022ss/bs/20220314> grep Toast test.txt +cassini/home/peter/bo/2022ss/bs/20220314> echo $? +1 +cassini/home/peter/bo/2022ss/bs/20220314> grep Test test.txt +Test +cassini/home/peter/bo/2022ss/bs/20220314> echo $? +0 diff --git a/20220328/if-1.txt b/20220328/if-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..5db8031ed6a81cbbb11785bd14322dd461a3c3b5 --- /dev/null +++ b/20220328/if-1.txt @@ -0,0 +1,7 @@ +cassini/home/peter/bo/2022ss/bs/20220314> if grep Test test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi +Test +gefunden +cassini/home/peter/bo/2022ss/bs/20220314> if grep Test test.txt > /dev/null; then echo "gefunden"; else echo "nicht gefunden"; fi +gefunden +cassini/home/peter/bo/2022ss/bs/20220314> if grep -q Test test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi +gefunden diff --git a/20220328/if-2.txt b/20220328/if-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..60732c3ed53863772c1832529866417685c0f662 --- /dev/null +++ b/20220328/if-2.txt @@ -0,0 +1,5 @@ +cassini/home/peter/bo/2022ss/bs/20220314> if grep -q Test test.txt +> then echo "gefunden" +> else echo "nicht gefunden" +> fi +gefunden diff --git a/20220328/if-3.sh b/20220328/if-3.sh new file mode 100755 index 0000000000000000000000000000000000000000..07c22ca5c97457a14481c16cfc1e571df48852ac --- /dev/null +++ b/20220328/if-3.sh @@ -0,0 +1,5 @@ +if grep -q Test test.txt; then + echo "gefunden" +else + echo "nicht gefunden" +fi diff --git a/20220328/if-3.txt b/20220328/if-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..a58fbc15993f5ab7a45b9f425f4f018aca6d6f44 --- /dev/null +++ b/20220328/if-3.txt @@ -0,0 +1,9 @@ +cassini/home/peter/bo/2022ss/bs/20220314> cat if-3.sh +if grep -q Test test.txt; then + echo "gefunden" +else + echo "nicht gefunden" +fi +cassini/home/peter/bo/2022ss/bs/20220314> chmod +x if-3.sh +cassini/home/peter/bo/2022ss/bs/20220314> ./if-3.sh +gefunden diff --git a/20220328/ls-2.both b/20220328/ls-2.both new file mode 100644 index 0000000000000000000000000000000000000000..0fc4e8bbabf8b455fd8e53155c1d931dc93d6969 --- /dev/null +++ b/20220328/ls-2.both @@ -0,0 +1 @@ +-rw-r--r-- 1 peter peter 20 Mär 28 13:14 test.txt diff --git a/20220328/pipes-1.txt b/20220328/pipes-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..a31f60393485cc40e2107fee6570a0db4aede226 --- /dev/null +++ b/20220328/pipes-1.txt @@ -0,0 +1,29 @@ +cassini/home/peter/bo/2022ss/bs/20220328> cat test.bc +1 + 1 +cassini/home/peter/bo/2022ss/bs/20220328> bc < test.bc +2 +cassini/home/peter/bo/2022ss/bs/20220328> echo "2 + 2" | bc +4 +cassini/home/peter/bo/2022ss/bs/20220328> cat test.txt +Test +Noch ein Test. +cassini/home/peter/bo/2022ss/bs/20220328> cat test.txt | sed -e 's/Test/Toast/g' +Toast +Noch ein Toast. +cassini/home/peter/bo/2022ss/bs/20220328> cat test.txt | gzip +gzip: compressed data not written to a terminal. Use -f to force compression. +For help, type: gzip -h +cassini/home/peter/bo/2022ss/bs/20220328> cat test.txt | gzip -f +7�Ab + I-.���O�PH����s�d-cassini/home/peter/bo/2022ss/bs/20220328> cat test.txt | gzip | gunzip +Test +Noch ein Test. +cassini/home/peter/bo/2022ss/bs/20220328> cat test.txt | gzip | cat | gunzip +Test +Noch ein Test. +cassini/home/peter/bo/2022ss/bs/20220328> cat test.txt | gzip > test.txt.gz +cassini/home/peter/bo/2022ss/bs/20220328> cat test.txt.gz +w�Ab + I-.���O�PH����s�d-cassini/home/peter/bo/2022ss/bs/20220328> cat test.txt.gz | gunzip +Test +Noch ein Test. diff --git a/20220328/pipes-2.txt b/20220328/pipes-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..6e5f761f3b599c90a7f943a0cb6df196dedf1fd3 --- /dev/null +++ b/20220328/pipes-2.txt @@ -0,0 +1,13 @@ +cassini/home/peter/bo/2022ss/bs/20220314> ls *.pdf +bs-20220314.pdf logo-hochschule-bochum.pdf unix-20220314.pdf +logo-hochschule-bochum-cvh-text.pdf Operating_system_placement-de.pdf +cassini/home/peter/bo/2022ss/bs/20220314> ls *.pdf | grep -v logo +bs-20220314.pdf +Operating_system_placement-de.pdf +unix-20220314.pdf +cassini/home/peter/bo/2022ss/bs/20220314> echo $(ls *.pdf | grep -v logo) +bs-20220314.pdf Operating_system_placement-de.pdf unix-20220314.pdf +cassini/home/peter/bo/2022ss/bs/20220314> ls -l $(ls *.pdf | grep -v logo) +-rw-r--r-- 1 peter peter 132739 Mär 13 22:24 bs-20220314.pdf +lrwxrwxrwx 1 peter peter 43 Apr 17 2016 Operating_system_placement-de.pdf -> ../common/Operating_system_placement-de.pdf +-rw-r--r-- 1 peter peter 149583 Mär 21 15:16 unix-20220314.pdf diff --git a/20220328/test.bc b/20220328/test.bc new file mode 100644 index 0000000000000000000000000000000000000000..8d2f0971e2ce6dbec02115565c6f0e9c10ee9a02 --- /dev/null +++ b/20220328/test.bc @@ -0,0 +1 @@ +1 + 1 diff --git a/20220328/test.txt.gz b/20220328/test.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..4f6dd25dc60cbf979be117a062a21f9e19a48d78 Binary files /dev/null and b/20220328/test.txt.gz differ diff --git a/20220328/wildcards-1.txt b/20220328/wildcards-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..b07312ed004cde167749945cacc9d4ecbe983683 --- /dev/null +++ b/20220328/wildcards-1.txt @@ -0,0 +1,6 @@ +cassini/home/peter/bo/2022ss/bs/20220314> ls *.txt +for-1.txt if-0.txt if-2.txt pipes-2.txt test.txt +for-2.txt if-1.txt if-3.txt test-2.txt +cassini/home/peter/bo/2022ss/bs/20220314> echo mv -i {for,if,pipes}-*.txt ../20220321/ +mv -i for-1.txt for-2.txt if-0.txt if-1.txt if-2.txt if-3.txt pipes-2.txt ../20220321/ +cassini/home/peter/bo/2022ss/bs/20220314> mv -i {for,if,pipes}-*.txt ../20220321/ diff --git a/20220328/wildcards-2.txt b/20220328/wildcards-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..d9414635c832a2a1f4b353070a95883cfb11d34d --- /dev/null +++ b/20220328/wildcards-2.txt @@ -0,0 +1,15 @@ +cassini/home/peter/bo/2022ss/bs/20220321> ls *.txt +for-1.txt if-0.txt if-2.txt pipes-2.txt test-2.txt test-4.txt +for-2.txt if-1.txt if-3.txt test-1.txt test-3.txt wildcards-1.txt +cassini/home/peter/bo/2022ss/bs/20220321> ls *.txt | grep -v test +for-1.txt +for-2.txt +if-0.txt +if-1.txt +if-2.txt +if-3.txt +pipes-2.txt +wildcards-1.txt +cassini/home/peter/bo/2022ss/bs/20220321> echo mv $(ls *.txt | grep -v test) ../20220328/ +mv for-1.txt for-2.txt if-0.txt if-1.txt if-2.txt if-3.txt pipes-2.txt wildcards-1.txt ../20220328/ +cassini/home/peter/bo/2022ss/bs/20220321> mv $(ls *.txt | grep -v test) ../20220328/