From ed4aa3688dc31c3991776c2638206593d6829fe6 Mon Sep 17 00:00:00 2001 From: 0qln Date: Mon, 20 Oct 2025 09:51:27 +0200 Subject: [PATCH] a3 --- pa-01/a3/b.sh | 3 ++- pa-01/a3/c.sh | 4 +++- pa-01/a3/d.sh | 2 +- pa-01/a3/e.sh | 3 +-- pa-01/a3/f.sh | 5 +++-- pa-01/a3/g.sh | 3 ++- pa-01/a3/h.sh | 3 +-- pa-01/a3/i.sh | 6 +++--- pa-01/a3/j.sh | 4 +--- 9 files changed, 17 insertions(+), 16 deletions(-) diff --git a/pa-01/a3/b.sh b/pa-01/a3/b.sh index c52f2c7..178f4fa 100755 --- a/pa-01/a3/b.sh +++ b/pa-01/a3/b.sh @@ -1 +1,2 @@ -ls -a ~ +#!/bin/sh +which ls pwd exit diff --git a/pa-01/a3/c.sh b/pa-01/a3/c.sh index 7641623..4225eb6 100755 --- a/pa-01/a3/c.sh +++ b/pa-01/a3/c.sh @@ -1 +1,3 @@ -cat /etc/passwd +#!/bin/sh +cp /bin/cp ~/ +which cp diff --git a/pa-01/a3/d.sh b/pa-01/a3/d.sh index 6bbd44d..5b9001e 100755 --- a/pa-01/a3/d.sh +++ b/pa-01/a3/d.sh @@ -1,2 +1,2 @@ #!/bin/sh -wc -wl /etc/passwd +mv ~/cp ~/mycp diff --git a/pa-01/a3/e.sh b/pa-01/a3/e.sh index f6f2bdd..5b27e45 100755 --- a/pa-01/a3/e.sh +++ b/pa-01/a3/e.sh @@ -1,3 +1,2 @@ #!/bin/sh -head -n 7 /etc/passwd -tail -n 7 /etc/passwd +env diff --git a/pa-01/a3/f.sh b/pa-01/a3/f.sh index d593835..21be55d 100755 --- a/pa-01/a3/f.sh +++ b/pa-01/a3/f.sh @@ -1,2 +1,3 @@ -touch ~/.hidden-file -mkdir ~/.hidden-dir +#!/bin/sh +alias ".."="cd .." +alias "..."="cd ../.." diff --git a/pa-01/a3/g.sh b/pa-01/a3/g.sh index 54b553d..f046f78 100755 --- a/pa-01/a3/g.sh +++ b/pa-01/a3/g.sh @@ -1 +1,2 @@ -mv ~/.hidden-file ~/.hidden-dir/ +#!/bin/sh +alias "−"="cd -" diff --git a/pa-01/a3/h.sh b/pa-01/a3/h.sh index f3e9d15..27bc91b 100755 --- a/pa-01/a3/h.sh +++ b/pa-01/a3/h.sh @@ -1,3 +1,2 @@ #!/bin/sh -yesterday="$(date -d "yesterday 13:00" '+%Y-%m-%d')" -touch -d "$yesterday" ~/.hidden-dir/.hidden-file +unalias "-" ".." "..." diff --git a/pa-01/a3/i.sh b/pa-01/a3/i.sh index 8e7ddc5..3959c50 100755 --- a/pa-01/a3/i.sh +++ b/pa-01/a3/i.sh @@ -1,4 +1,4 @@ #!/bin/sh -f1="/usr/include/linux" -f2="/usr/bin/X11/X" -realpath -s --relative-to="$f1" "$f2" +touch "-2" +ls -a "-2" +rm "-2" diff --git a/pa-01/a3/j.sh b/pa-01/a3/j.sh index 652888a..dcf9299 100755 --- a/pa-01/a3/j.sh +++ b/pa-01/a3/j.sh @@ -1,4 +1,2 @@ #!/bin/sh -f1="/var/log/cups" -f2="/root" -realpath -s --relative-to="$f1" "$f2" +ls -a /etc/*.conf