[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why does a shell script need current directory?
From: |
Peng Yu |
Subject: |
Why does a shell script need current directory? |
Date: |
Fri, 12 Feb 2021 22:49:35 -0600 |
Hi,
I run the following script in a directory that is deleted (on Mac OS
X). I see then the following error. Why does bash need to access the
current directory? Thanks.
$ cat /tmp/main.sh
#!/usr/bin/env bash
$ /tmp/main.sh
shell-init: error retrieving current directory: getcwd: cannot access
parent directories: No such file or directory
--
Regards,
Peng
- Why does a shell script need current directory?,
Peng Yu <=