每次运行此代码时,我都会收到错误文件或目录不存在。为什么?
read -p "Enter the filename/path of the file you wish to delete : " filename
echo "Do you want to delete this file"
echo "Y/N"
read ans
case "$ans" in
Y) "`readlink -f $filename`" >>~/TAM/store & mv $filename ~/TAM/dustbin
echo "File moved" ;;
N) "File Not deleted" ;;
esac
当我准确输入文件名/目录并三次检查其正确性时,我仍然收到此错误,但 readlink 部分有效。