我正在尝试创建一个脚本来在我的虚拟机上创建虚拟集群,这是一个CentOS 7 minimal。
我有一个名为GridPane
@ECHO OFF
Runs my Python Scripts
C:\path-to-python\Python.exe C:\path-to-scripts\A.py
ECHO Ran script A
(Repeat as needed)
PAUSE
然后据我所知,我必须让它可执行
cluster
在此之后我应该为它创建一个syslink #!/bin/bash
function vc
{
echo
echo -n "Enter project name: "
read platform_name
echo
echo -n "web extension: "
read web_extension
echo
echo -e "The following website will be created"
echo -e "\e[32m Platform:\e[0m\t${platform_name}"
echo -e "\e[32m Extension:\e[0m\t${web_extension}"
echo -e "\e[32m Full URL:\e[0m\t http://www.${platform_name}.${web_extension}"
echo
echo -e "Do you wish to proceed? [Y/n]"
read -p "Are you sure? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo
echo -e "\e[32m Creating platform \e[0m\t"
else
echo
echo -e "\e[32m Not creating platform \e[0m\t"
fi
}
if [ -n "$(type -t $FUNCTION_NAME)" ] && [ "$(type -t $FUNCTION_NAME)" =
function ];
then $FUNCTION_NAME $2; else help; fi
现在我通常应该只在终端中打字chmod +x cluster
并且它应该执行脚本但是它一直给我"命令集群找不到"
我做错了什么吗?或者我是否需要在其上使用另一个chmod以便我可以运行它?
答案 0 :(得分:1)