| 1 | #!/bin/bash |
| 2 | |
| 3 | address=/home/bozo/daily-journal.txt |
| 4 | |
| 5 | echo "Basename of /home/bozo/daily-journal.txt = `basename $address`" |
| 6 | echo "Dirname of /home/bozo/daily-journal.txt = `dirname $address`" |
| 7 | echo |
| 8 | echo "My own home is `basename ~/`." # `basename ~` also works. |
| 9 | echo "The home of my home is `dirname ~/`." # `dirname ~` also works. |
| 10 | |
| 11 | exit 0 |