我如何进行阅读并没有在Shell Scripting中显示它的价值?

use*_*740 4 bash shell

大家好我正在使用ubuntu 11,我正在用它做一些shell脚本.我现在面对的唯一问题是"阅读"显示它的价值,我不知道它是如何发生的,因为这是第1次.时间我用"读",我可以看到它的价值!这里的任何方式是我的代码:

#!/bin/bash

echo -n "Which file you want 2 store: "
read fname
echo -n "Do u want 2 delete file $fname in its current location? [Y\N]: "
read ansr

sudo tar -c -v -f The_Store.tar $fname
sudo chmod 700 The_Store.tar

if [ "$ansr" = "Y" ]; then
rm $fname
fi

echo "Congrats, ur file been stored"
Run Code Online (Sandbox Code Playgroud)

用户回答Q后,"fname"的值显示:你想要在当前位置删除文件$ fname吗?任何人都可以帮助mE.

我想要的只是保持"fname"的值隐藏..

Mic*_*ker 6

bash联机帮助页部分read:

-s 静音模式.如果输入来自终端,则不回显字符.