小编Mik*_*ren的帖子

评估文件名,邪恶?

我有以下用于创建项目的脚本:

clear
version="0.0.2"
echo "Project creator"
echo "---------------"
# ask user to specify a directory (could start with spelled-out home directory)
directoryName=""
# Input must meet the following criteria: 
# 1.) No spaces at all in the directory path
# 2.) some characters must be entered
while [[ ${#directoryName} -eq 0 || $directoryName == *" "* ]]
        do
                echo -e "\nEnter the full directory of the project (no spaces):"
                read directoryName
        done
echo "You entered: $directoryName"
# uate directoryName so …
Run Code Online (Sandbox Code Playgroud)

bash shell-script

4
推荐指数
1
解决办法
808
查看次数

标签 统计

bash ×1

shell-script ×1