a1 und a2

This commit is contained in:
0qln
2025-10-20 09:40:01 +02:00
commit fc833b39ba
36 changed files with 2220 additions and 0 deletions

2
pa-01/a2/a.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
echo ~

1
pa-01/a2/b.sh Executable file
View File

@@ -0,0 +1 @@
ls -a ~

1
pa-01/a2/c.sh Executable file
View File

@@ -0,0 +1 @@
cat /etc/passwd

2
pa-01/a2/d.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
wc -wl /etc/passwd

3
pa-01/a2/e.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
head -n 7 /etc/passwd
tail -n 7 /etc/passwd

2
pa-01/a2/f.sh Executable file
View File

@@ -0,0 +1,2 @@
touch ~/.hidden-file
mkdir ~/.hidden-dir

1
pa-01/a2/g.sh Executable file
View File

@@ -0,0 +1 @@
mv ~/.hidden-file ~/.hidden-dir/

3
pa-01/a2/h.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
yesterday="$(date -d "yesterday 13:00" '+%Y-%m-%d')"
touch -d "$yesterday" ~/.hidden-dir/.hidden-file

4
pa-01/a2/i.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
f1="/usr/include/linux"
f2="/usr/bin/X11/X"
realpath -s --relative-to="$f1" "$f2"

4
pa-01/a2/j.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
f1="/var/log/cups"
f2="/root"
realpath -s --relative-to="$f1" "$f2"