This commit is contained in:
Timo Schmidt 2023-03-14 23:51:15 +01:00
commit ae83331d48
8 changed files with 36 additions and 0 deletions

3
ex01/print_groups.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
id "${FT_USER}" -nG | tr ' ' ',' | tr -d '\n'

3
ex02/find_sh.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
find . -type f -name "*.sh" | xargs -I{} basename {} | sed 's/\.sh$//g'

3
ex03/count_files.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
find . | wc -l

3
ex04/MAC.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
ifconfig -a | grep ether | awk '{ print $2 }'

1
ex05/"\?$*'MaRViN'*$?\" Normal file
View File

@ -0,0 +1 @@
42

3
ex06/skip.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
ls -l | awk 'NR % 2 == 1'

17
ex07/r_dwssap.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
FT_DIFF=$((FT_LINE2 - FT_LINE1 + 1))
cat /etc/passwd |
grep -v '#' |
sed '1d' |
awk 'NR % 2 == 1' |
rev |
sort -r |
rev |
cut -d':' -f1 |
rev |
head -"${FT_LINE2}" |
tail -"${FT_DIFF}" |
tr '\n' ':' |
sed -e 's/:$/./g' -e 's/:/, /g'

3
ex08/add_chelou.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo hi