所以我有一個bash腳本調用另一個bash腳本。 第二個腳本位於不同的文件夾中。 script1.sh:
"some_other_folder/script2.sh"
# do something
script2.sh:
src=$(pwd) # THIS returns current directory of script1.sh...
# do something
在它的線s
我希望我的窗口標題欄顯示我的PWD。在我.bashrc我有這個,這似乎做的伎倆爲擊: # If this is an xterm set the title to [email protected]:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\[email prote
我在處理bash腳本語言時遇到了一些奇怪的問題。 這裏是: PWD=${pwd}
# several commands
cd /etc/nginx/sites-enabled/
# more commands
cd $PWD
# I expect that I returning to my directory,
# but $PWD contains current dir - /e