mount ntfs-3g 명령에서 변수 사용

mount ntfs-3g 명령에서 변수 사용

변수를 사용하지 않을 때는 다음과 같이 작동합니다.

sudo mount -t ntfs-3g /dev/sdc1 /mydirectory/tools

변수에 파티션 이름과 디렉터리 경로 이름을 넣으려는 경우:

diskName="/dev/sdc1"
pathName="/mydirectory/tools"

sudo mount -t ntfs-3g $diskName $pathName

오류가 발생합니다.

mount: can't find /mydirectory/tools in /etc/fstab

내가 도대체 ​​뭘 잘못하고있는 겁니까? 디스크 이름과 디렉터리 경로를 변수에 넣어서 mount 명령으로 사용하려면 어떻게 해야 하나요?

관련 정보