從某個位置獲取文件時,我遇到了太多參數錯誤,如下所示:
joesan@joesan-InfinityBook-S-14-v5:~$ source '/opt/ros/noetic/setup.bash'
bash: cd: too many arguments
我嘗試使用雙引號,不帶引號,但此錯誤仍然存在。知道為什麼會發生這種情況嗎?
這是 setup.bash 檔案的內容:
#!/usr/bin/env bash
# generated from catkin/cmake/templates/setup.bash.in
CATKIN_SHELL=bash
# source setup.sh from same directory as this file
_CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)
. "$_CATKIN_SETUP_DIR/setup.sh"