我没有-f在本程序中使用此声明.
if [ -f $file ]
Run Code Online (Sandbox Code Playgroud)
我if知道为什么我们-f在这里使用?
这是整个计划:
case $ch in
1)
echo -e "\n This is File Create Operation"
echo -e "\n Please Enter File Name:"
read file
if [ -f $file ]
then
echo -e "\n File already existing!!!"
else
touch $file
echo -e "\n File Created!!!"
echo -e "\n Created File can be Checked From Following Table"
ls -t|head -n 15
fi
;;
Run Code Online (Sandbox Code Playgroud)