나는 초보자이며 도움이 필요합니다.
다른 디렉토리의 한 디렉토리에서 일부 파일을 이동시키는 스크립트를 만들려고합니다. 스크립트를 작성하기 전에 명령을 테스트했으며 작동했습니다.
mv /path/to/source /path/to/destination
내가 스크립트를 만든 후에 nano:
#!bin/bash/
echo "mv /path/to/source /path/to/destination"
스크립트를 실행 파일로 만든 chmod +x file
다음 다음과 같이 실행 ./file했지만 다음 오류가 나타납니다.
bash: ./move.sh: /bin/bash/: bad interpreter: Not a directory
나는 sudo ./filebash 파일을 사용해 보았지만 작동하지 않습니다.
VirtualBox와 함께 설치된 Ubuntu를 사용하고 있습니다.
Advanced Bash-Scripting Guide를 살펴보십시오 .
—
LiveWireBT