This commit is contained in:
qwjyh 2024-10-10 20:53:37 +09:00
commit 9f1862f150
8 changed files with 56 additions and 0 deletions

5
subdir/called.sh Executable file
View file

@ -0,0 +1,5 @@
echo "Hi, this is called"
echo "\${0}: ${0}"
pwd
echo "Good bye"
exit 1

11
subdir/entry.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/env bash
set -euo pipefail
echo "Hi, this is entry.sh"
echo "pwd:"
pwd
echo "\${0}: ${0}"
cd "$(dirname "${0}")"
./called.sh
echo $?
echo "returned"
exit 0